Home » SQL & PL/SQL » SQL & PL/SQL » String IN
String IN [message #202183] Wed, 08 November 2006 11:03 Go to next message
renafi
Messages: 42
Registered: October 2006
Member
Hi. I want to make a sql statement like this:

create table table1
(colection varchar2(100), value number);

insert into table1
values('('A','B','C'), 1);


select * from table1 where 'B' in colection;


It doesn't work. Is there anyway to make this work?

Thanks

EDIT: Solved it with Instr Razz Sorry

[Updated on: Wed, 08 November 2006 11:16]

Report message to a moderator

Re: String IN [message #202184 is a reply to message #202183] Wed, 08 November 2006 11:17 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
select * from table1 where instr(collection,'B')>0;
Previous Topic: a question regarding GRANT ALTER ON table TO user
Next Topic: ORA-1722 "inavlid number" occured in case of valid number.
Goto Forum:
  


Current Time: Sat Dec 03 13:55:31 CST 2016

Total time taken to generate the page: 0.09915 seconds