Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the delimeters of a text field !!!!!!!!!!!!

Status
Not open for further replies.

GERPAT

Programmer
Aug 15, 2002
30
IE
I am running the following query.

select a.spkeywords,b.eventname
from eventlist a, event b
where b.spid in a.list

"list" is a field containing a list of event ids. I want to return all events that appear in this list. The problem is my list is delimited by a comma but oracle needs the list to be delimeted in the following way: 'id','id'. My question is how to I change the delimiters in the list field so that I can perform an IN operation.

 
Oracle needs the list to be the LIST, not the STRING, representin comma delimited list. Even changing "id,id" "'id','id'" will not help you. Though, in some cases you may play with INSTR function. If ID field is integer you may change your condition to

where instr(','||a.list||',', ','||b.spid||',')<>0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top