Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Underscore "_" character problem
Dear Richards,
I am sure you know that in SQL underscore (_) is a single character wild card. Using an escape character can solve your problem.
Try the following:
SELECT column1, column2 ,... FROM Table1 WHERE column1 LIKE '728\_' ESCAPE
'\';
Here '\' is used as an escape character to tell the computer that '_' is not used as a single character wild card
Hope this would help
Regards,
Aleem
-----Original Message----- From: drichard_at_mtlindia.com [mailto:drichard_at_mtlindia.com] Sent: 31 May, 2000 9:24 AM To: Multiple recipients of list ORACLE-L Subject: Underscore "_" character problem Dear Experts I have found a problem in my query. In the Product master, we have products like '728_',alone.
'728+', 'IMB7+',
'IMB7_' when we retrieve all the records using 'product_code like
'IMB7_',
it retrieves the records belonging to 'IMB7_'
But when we retrieve all the records using 'product_code like '728_',
it retrieves the records belonging to '728_' and
'728+'.
It is not recognising the "_" character when included with numbers.
any solution please......... Received on Wed May 31 2000 - 00:20:44 CDT
![]() |
![]() |