Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Oracle SQL: search underscore or percentage (Read 10691 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Oracle SQL: search underscore or percentage
29.09.06 at 13:52:22
 
Oracle SQL: search underscore or percentage
 
If you include a like operator in your SQL statement and you would like to match strings that contain an underscore or percentage symbol you must escape these symbols. Normally an underscore is a placeholder for a single character and a percentage symbol is used for any number of characters.
 
To seach for an underscore or a percentage you must precede the underscore or percentage with an escape symbol. In my example below I am defining the exclamation mark as escape symbol.
 
select * from mytable where col1 like '!_E%' escape '!'
 
I am trying to match all rows where col1 contains the string _E
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1