-
escaping wildcards
Got a problem thats driving me nuts and not cant see the wood for the trees! I want to escape any underscores on a table_name:
set escape "\"
SQL> select table_name from user_tables
2 where table_name like 'GE\_%';
TABLE_NAME
------------------------------
GENEVA_SUMMARY
GET1
GE_T1
Basically I just want to return GE_T1
Any help appreciated!
-
hey try this
set escape=\
select table_name from user_tables
where table_name like 'GE\_%' ESCAPE '\';
Srini
-
Mmmm - seems to work only if you set escape off -
SQL> select table_name from user_tables
2 where table_name like 'GE\_%' escape '\'
3 ;
where table_name like 'GE_%' escape ''
*
ERROR at line 2:
ORA-01425: escape character must be character string of length 1
SQL> set escape off
SQL> select table_name from user_tables
2 where table_name like 'GE\_%' escape '\'
3 ;
TABLE_NAME
------------------------------
GE_T1
Really could do with setting it for my SQL*Plus session but thats v much for the work around!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|