Home » SQL & PL/SQL » SQL & PL/SQL » Variable formatting
Variable formatting [message #305192] Mon, 10 March 2008 01:47 Go to next message
ora_2007
Messages: 430
Registered: July 2007
Location: Mumbai
Senior Member
Hi,

I need help rearding manipulation of variable.

Variable may be in any form:

v_test := 'ADD,MUL,SUB';
or
v_test := 'ADD,MUL,';
or
v_test := ',MUL,SUB';
or
v_test := 'ADD,MUL,SUB';
or
v_test := ', ,SUB';
or
v_test := 'ADD, ,SUB';
or
v_test := 'ADD,,';

then my query will be...

select id
into v_id
from test_tab
where oper in (v_test)


How could i format my variable so that I will not get any error?

Thanks in advance.
Re: Variable formatting [message #305197 is a reply to message #305192] Mon, 10 March 2008 01:58 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no error.

Regards
Michel
Re: Variable formatting [message #305284 is a reply to message #305197] Mon, 10 March 2008 05:36 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe you are looking for a way to vary elements in IN list.
Previous Topic: What query do I use to list the primary key
Next Topic: i had a problem with Query
Goto Forum:
  


Current Time: Sat Dec 10 01:09:03 CST 2016

Total time taken to generate the page: 0.07851 seconds