Embedded cursor? 
Author Message
 Embedded cursor?

Forgive me but I am brain dead.

1. I have a database called BKup in that database is a  
table of all of the windows servers and the start and end
times of the windows backup.
2. There is another database on a different server called
Software. It lists all of the servers that have SQL
Server on them.
3. I query each server that have SQL Server on it, to
check to see if it's database backup ran
(msdb.dbo.backupset). If it did, is it before the windows
backup ran.

I was thinking I could use embedded cursors. How do you
pass the results from on cursor to be run in another
cursor? Example:

DECLARE BK_CUR CURSOR FOR
SELECT type, backup_start_date, Backup_finish_date


           and backup_start_date between getdate() -1 and
getdate()
          and type = 'd'

Thanks

Stacey



Sat, 22 May 2004 04:05:21 GMT
 Embedded cursor?

stacey,

this is one {*filter*} process...



against bkup info

-oj


Quote:
> Forgive me but I am brain dead.

> 1. I have a database called BKup in that database is a
> table of all of the windows servers and the start and end
> times of the windows backup.
> 2. There is another database on a different server called
> Software. It lists all of the servers that have SQL
> Server on them.
> 3. I query each server that have SQL Server on it, to
> check to see if it's database backup ran
> (msdb.dbo.backupset). If it did, is it before the windows
> backup ran.

> I was thinking I could use embedded cursors. How do you
> pass the results from on cursor to be run in another
> cursor? Example:


> DECLARE BK_CUR CURSOR FOR
> SELECT type, backup_start_date, Backup_finish_date


>    and backup_start_date between getdate() -1 and
> getdate()
>   and type = 'd'

> Thanks

> Stacey



Sat, 22 May 2004 04:26:09 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with Embedded Cursors

2. Embedded cursor control

3. Batch & embedded cursor problem. Pls help!

4. Embedded-SQL: i can't properly open cursors

5. Passing cursor between functions in embedded SQL

6. Embedded SQL Problem: Cursor, Fetch

7. Performance with large Cursors (Embedded SQL/C)

8. Cursors - Packets & Embedded SQL (C precompiler)

9. SLOOOW Cursors in Embedded Sql/C

10. Error 540 with embedded SQL and cursors

11. Cursors & embedded SQL

12. embedded SQL:Problem during compilation in embedded sql(MSSQL) with VC++


 
Powered by phpBB® Forum Software