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

Thread: Placeholder Negation

  1. #1
    Join Date
    Jun 2002
    Posts
    16
    Hi Everyone,

    I have a search string consisting of a number of characters on the right, a number of characters on the left and the character sequence _T_ in the middle.
    Normally this would then be a search string such as:

    '%_T_%'

    How do I negate the single placeholder '_' on both sides of the T so that it is recognised as an actual underscore?

    Thanks
    Peer

  2. #2
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Hi,

    ... like '%\_T\_%' escape '\'

    HTH
    Ales
    The whole difference between a little boy and an adult man is the price of toys

  3. #3
    Join Date
    Jun 2002
    Posts
    16
    Thanks HTH, but no success, I'm afraid.

    The entire query is:

    select object_name from user_objects where object_type like 'PACKAGE' and object_name like '%\_T\_%';

    This returns no results at all, but I can see loads of packages containing the '_T_' when I do the select:

    select object_name from user_objects where object_type like 'PACKAGE' and object_name like '%_T_%';

    This returns all objects containing the letter 'T', of course.

    Bye
    Peer

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Xou didn't read carefuly what ales has written. Your query should be

    select object_name from user_objects where object_type like 'PACKAGE' and object_name like '%\_T\_%' escape '\'
    ;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Jun 2002
    Posts
    16
    Hi jmodic,
    You're right, of couse. It works perfectly now. Thanks to both of you.
    Bye
    Peer

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