Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Data Warehousing / April 2005

Tip: Looking for answers? Try searching our database.

Start DTS when max value in table has been reached

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
w.peereboom - 22 Apr 2005 15:25 GMT
Hello,

My problem:
Antoher server (DTS task) is updating tables in my database on my
server. After these updates i would like to start my dts. So i can be
sure to have the most updated values in my table.

For now i start my DTS at a certain time with the job manager. But
sometimes the DTS from the third party (on the other server) is taking
to much time so my dts is working with not updated values.

What i would like to do: I know that if count(*) of a certain table
gives me for example 1500 rows, my dts can start. so with some sort of
while-loop i could test if this amount has been reached en then start
the DTS.

Can anyone send me some example script/ dts / sql to perform this action
and how to loop while the amount of 1500 has not been reached

allready thanks

W. Peereboom
Jacco Schalkwijk - 23 Apr 2005 22:00 GMT
You can put a T-SQL task as the first step in your stored procedure that
consists of the following, to check every 5 minutes if the table has already
1500 rows:

WHILE (SELECT COUNT(*) FROM some_table) < 1500
  WAITFOR DELAY '00:05:00'

Signature

Jacco Schalkwijk
SQL Server MVP

> Hello,
>
[quoted text clipped - 18 lines]
>
> W. Peereboom
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.