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