PRINT '=========================='
print ' LOGIN UPDATE DETAILS '
PRINT '=========================='
select CONVERT(VARCHAR(15), loginname) loginname,CONVERT(VARCHAR(10), dbname) dbname, updatedate from master..syslogins where convert(varchar(8),updatedate,112)> convert(varchar(8),getdate()- 7,112) and createdate <> updatedate
PRINT '=========================='
print ' LOGIN DETAILS '
PRINT '=========================='
select CONVERT(VARCHAR(15), loginname) loginname, CONVERT(VARCHAR(10), dbname) dbname, createdate from master..syslogins where convert(varchar(8),createdate,112) > convert(varchar(8),getdate()- 7,112)
No comments:
Post a Comment