DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Bug with LIKE ?

  1. #1
    Join Date
    Mar 2006
    Posts
    74

    Bug with LIKE ?

    I have some stored procedures with a single underscore in the name:

    TEST2_200601011234
    TEST2_200701011234


    Can someone tell me why the following queries returns two records:

    SELECT * FROM user_procedures WHERE object_name LIKE 'TEST2__%'
    SELECT * FROM user_procedures WHERE object_name LIKE 'TEST2_______%'

    If _ is the wildcard for a single character, how do I turn that off?

  2. #2
    Join Date
    Mar 2006
    Posts
    74
    Quote Originally Posted by cjard

    If _ is the wildcard for a single character, how do I turn that off?
    It is..

    SELECT ... LIKE 'TEST2\_%' ESCAPE '\'

Posting Permissions

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


Click Here to Expand Forum to Full Width