Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
avmreddy17
Posting Yak Master
180 Posts |
Posted - 2008-03-04 : 10:07:18
|
Can some help me re-write the Qty so that I have the database_Name and Latest Backup_finish_date with out using CursorSELECT database_name , backup_finish_date FROM msdb.dbo.backupset WHERE TYPE = 'D' AND database_name IN ( SELECT name FROM master..SysDatabases WHERE DBID > 5 ) ORDER BY backup_finish_date DESC |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-04 : 10:10:37
|
SELECT database_name , MAX(backup_finish_date) As LatestBackupDate FROM msdb.dbo.backupset WHERE TYPE = 'D' AND database_name IN ( SELECT name FROM master..SysDatabasesWHERE DBID > 5 ) GROUP BY database_name ORDER BY backup_finish_date DESC |
 |
|
|
|
|