Home » SQL & PL/SQL » SQL & PL/SQL » more element in IN clause (Oracle 10g)
more element in IN clause [message #306613] Sat, 15 March 2008 02:00 Go to next message
mestoganesh
Messages: 16
Registered: May 2007
Location: Chennai
Junior Member
Hi experts,
First of all i accept we have a bad database design. we need to adjust according to that.

we had csv values in clob column(primary key for another table). I need to pass clob column in IN clause in another query. But unfortunately it have more than 1000 tokens.How can i resolve this problem.

Thanks in Advance.
Re: more element in IN clause [message #306621 is a reply to message #306613] Sat, 15 March 2008 02:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
AskTom varying elements in IN list

Regards
Michel
Re: more element in IN clause [message #306639 is a reply to message #306621] Sat, 15 March 2008 05:10 Go to previous messageGo to next message
mestoganesh
Messages: 16
Registered: May 2007
Location: Chennai
Junior Member
Thanks Michel,

I want to tokenize the clob with comma and then pass all elements in IN clause. Sorry to mention in my previous post
Re: more element in IN clause [message #306641 is a reply to message #306639] Sat, 15 March 2008 05:16 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Quote:
we had csv values in clob column(primary key for another table)

Quote:
I want to tokenize the clob with comma

So which one is correct ?

Regards

Raj
Re: more element in IN clause [message #306650 is a reply to message #306641] Sat, 15 March 2008 08:00 Go to previous messageGo to next message
mestoganesh
Messages: 16
Registered: May 2007
Location: Chennai
Junior Member
Rajaram,
I had a clob column values like
(aaaaaaaaaaaaaaaaaaaaa,bbbbbbbbbbbbbbbbbbbbbb,dddddddddddddddddddd,ccccccccccccccccccccccccc,fsaddddddddsdfsdfsdfsdfd,wrwerewqrewrwer )
this is one single column value.
i need to tokenize this column values.
so that we pass in another qry just like
IN(aaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbb,
dddddddddddddddddddd,
ccccccccccccccccccccccccc,
fsaddddddddsdfsdfsdfsdfd,
wrwerewqrewrwer)

Re: more element in IN clause [message #306655 is a reply to message #306650] Sat, 15 March 2008 10:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And this is what is explained in the link I posted.
Please read it.

Regards
Michel
Re: more element in IN clause [message #306666 is a reply to message #306613] Sat, 15 March 2008 11:33 Go to previous messageGo to next message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
this is a common question asked several times on OraFaq already. I will say, I feel the OraFaq search feature does not work that well so it is hard at times to find a simliar thread.

Tom's thread is good, but a long read. Here is the OraFaq thread that is much shorter and more to our point.

http://www.orafaq.com/forum/m/294740/56289/#msg_294740

Good luck, Kevin
Re: more element in IN clause [message #307156 is a reply to message #306655] Tue, 18 March 2008 00:53 Go to previous message
mestoganesh
Messages: 16
Registered: May 2007
Location: Chennai
Junior Member
Thanks Kevin and Michel. Now,I got the solutions.
Previous Topic: Get count of first 5000 rows from the result set
Next Topic: create a function
Goto Forum:
  


Current Time: Thu Dec 12 04:23:40 CST 2024