|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
underscore search in oracle
I need to search the name that contains underscore.
The query I sent was select name from table where name like '%N__% ; and I get all the names that has single underscore too My output was N_1 N__1 N_1_2 whereas I should be getting only N__1 I understand that '_' is a special character like '%' in oracle.Difference being '_' is for single character match & '%' is for any number of characters match. Any help how to modify my query to get the required name only ? Thanks in advance. |
|
#2
|
|||
|
|||
|
Please try:
select name from table where name like '%N\_%' ESCAPE '\'; cheers, Dan Last edited by Dan Drillich : September 24th, 2003 at 01:01 PM. |
|
#3
|
|||
|
|||
|
Thanks. Already got it working.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > underscore search in oracle |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|