Results 1 to 9 of 9

Thread: User NOT LIKE (alpha)

  1. #1
    Join Date
    Apr 2006
    Posts
    178

    User NOT LIKE (alpha)

    Hi

    for MS SQL 2000

    I am searching users for each letter

    WHERE users.name LIKE ('A%')

    how can i search For users.name not starting by A to Z ? all except letters

    thank you

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Something like:

    where substring(user.name, 1, 1) not in (.....)

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    WHERE users.name LIKE '[^A-Z]%'

  4. #4
    Join Date
    Apr 2006
    Posts
    178
    WHERE users.name LIKE '[^A-Z]%'

    Or

    users.name NOT LIKE '[A-Z]%' ?

    thank you

  5. #5
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If you have database with case insesitivity then both of them are same.

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    They should be same in case sensitive db too.

  7. #7
    Join Date
    Apr 2006
    Posts
    178
    thank you ...

  8. #8
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    What I meant was

    WHERE users.name LIKE '[^A-Z]%'

    Or

    users.name NOT LIKE '[A-Z]%' ?

    are same but if the database is case sensitive then you will still get records with names in lower case.

  9. #9
    Join Date
    Apr 2006
    Posts
    178
    the database is not but it is good to know
    thank you skhanal

Posting Permissions

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