Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2003
    Location
    Cape Town
    Posts
    38

    Unanswered: Query on syslogins table

    Pls help me out with this query as

    select * from master..syslogins WHERE hasaccess = 1

    as it is both giving me record where hasaccess = 0 and 1

    brgds
    Benone

  2. #2
    Join Date
    Jun 2004
    Posts
    57

    Watch the design of syslogins view

    The hasaccess column of the syslogins view is build based on the xstatus column of the sysxlogins table. If you will read carefully the design of thw view you will find the answer.

  3. #3
    Join Date
    Oct 2003
    Location
    Cape Town
    Posts
    38
    Need help with correct SQL string rather than reference as gather fm Books online that hasaccess column is integer

    Quote
    hasaccess int -- 1, if login has been granted access to the server.
    Unquote

    hence do not still understand why it is not working ?
    Benone

  4. #4
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Have you tried this?

    select name,hasaccess from master..syslogins where hasaccess=1

    I guess problem is QA - just select results in text not in grid.

  5. #5
    Join Date
    Jun 2004
    Posts
    57

    sysxlogins

    select * from sysxlogins where (xstatus&2) = 2
    select * from sysxlogins where (xstatus&2) <> 2

  6. #6
    Join Date
    Oct 2003
    Location
    Cape Town
    Posts
    38
    Trust also that's the case
    Benone

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •