Oracle SQL - How To Use Regular Expression in Pattern Match Conditions
Interview Question Database For Software Developers
|
|
| How To Use Regular Expression in Pattern Match Conditions | | How To Use Regular Expression in Pattern Match Conditions? - Oracle DBA FAQ - Understanding SQL Basics | | By: FYIcenter.com | If you have a pattern that is too complex for LIKE to handle, you can use the
regular expression pattern patch function: REGEXP_LIKE().
The following script provides you some good examples:
SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '.*fyi.*',
'i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL;
TRUE
SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '.*com$',
'i') THEN 'TRUE' ELSE 'FALSE' END FROM DUAL;
TRUE
SELECT CASE WHEN REGEXP_LIKE ('FYICenter.com', '^F.*','i')
THEN 'TRUE' ELSE 'FALSE' END FROM DUAL;
TRUE
| | ID: 827 | Rank: 1079 | Votes: 0 | Views: 32 | Submitted: 20070422 |
1070 :-) | | What Are DDL Statements | | What Are DDL Statements? - Oracle DBA FAQ - Understanding SQL DDL Statements... | | Submitted: 20070422 |
|
1063 :-) | | How To Create a New Table | | How To Create a New Table? - Oracle DBA FAQ - Understanding SQL DDL Statements... | | Submitted: 20070422 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|