RE: '_' in sql-query

RE: '_' in sql-query

 

  


OR YOU CAN TRY
select distinct column_name from all_tab_cols where column_name like 'FREELIST\_G%' ESCAPE '\';


Eg.

SQL> SELECT TNAME FROM TAB WHERE TNAME LIKE 'PLOT_R%';

TNAME
------------------------------
PLOTSREQUEST
PLOT_REQUEST_22JUN06

2 rows selected.

SQL> SELECT TNAME FROM TAB WHERE TNAME LIKE 'PLOT\_R%' ESCAPE '\';

TNAME
------------------------------
PLOT_REQUEST_22JUN06

1 row selected.

_____________________________________________________________
Umesh Rane
____________________________________________________________
-----Original Message-----
From: Sanjay [mailto:oracledba-ezmlmshield-x45595906.[Email address protected]
Sent: Tuesday, July 04, 2006 5:10 PM
To: LazyDBA Discussion
Subject: RE: '_' in sql-query

select distinct column_name from all_tab_cols where column_name like
'FREELIST_G%'

-----Original Message-----
From: Tore Sævik
[mailto:oracledba-ezmlmshield-x98013687.[Email address protected]
Sent: Tuesday, July 04, 2006 4:45 PM
To: LazyDBA Discussion
Subject: '_' in sql-query


select distinct column_name from all_tab_cols where column_name like
'FREELIST_%'

returns

FREELISTS
FREELIST_GROUPS

I would like the query to return only the FREELIST_GROUPS value (I
understand that _ means any caracther, but it sjould be possible to avoid
this?



thanks








**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.powel.no
**********************************************************************



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Oracle LazyDBA home page