• charipg (4/28/2015)


    I need to find the one day old(in last 24hrs) user details:

    Below script i am using , but its not working as expected.

    Any suggestions please.

    select name,createdate,* from syslogins where isntgroup=0 and isntname=1 and name not LIKE ('%sa-%') and name not LIKE ('%NT %') and createdate > DATEADD(hh,-24,GETDATE())

    What is not working about the query?

    Is it just that you get no results?

    No results would mean no user has been created within the past 24 hours.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events