Home » SQL & PL/SQL » SQL & PL/SQL » Problem on multi value parameter with IN operator (oracle dbase 10g, xp)
Problem on multi value parameter with IN operator [message #389599] Mon, 02 March 2009 20:47 Go to next message
OraVision
Messages: 17
Registered: March 2008
Junior Member
if i type:

Select * from emp where deptno in (10,20,30);


it simple and working.

but when i type

Select * from emp where deptno in (:p_value);


** here p_value is a text box or a variable that contains value of (10,20,30)





Re: Problem on multi value parameter with IN operator [message #389600 is a reply to message #389599] Mon, 02 March 2009 20:53 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Select * from emp where deptno in (:p_value);
Yes, does not work as you desire/expect.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you & please be consistent & correct in your postings.

Post DDL for tables.
Post DML for test data.

Post expected/desired results.
Re: Problem on multi value parameter with IN operator [message #389612 is a reply to message #389600] Mon, 02 March 2009 22:54 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


NO

Your executing from SQL*PLUS or Any other application??

>> here p_value is a text box or a variable that contains value of (10,20,30)

Explain us; How did you stored values in p_value
Re: Problem on multi value parameter with IN operator [message #389617 is a reply to message #389599] Mon, 02 March 2009 22:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This question is asked about every week, please search before posting.

Regards
Michel

[Updated on: Mon, 02 March 2009 22:59]

Report message to a moderator

Re: Problem on multi value parameter with IN operator [message #389619 is a reply to message #389617] Mon, 02 March 2009 23:02 Go to previous message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Michel Cadot wrote on Tue, 03 March 2009 05:59
This question is asked about every week, please search before posting.

Regards
Michel


Including by YOU in 'How to use "IN" for this query' topic.
And you already had the answer, it does change with the month.

[Updated on: Mon, 02 March 2009 23:03]

Report message to a moderator

Previous Topic: Bulk Exception
Next Topic: Count Number of Null Column Values of each Record in a Table
Goto Forum:
  


Current Time: Tue Dec 10 02:51:42 CST 2024