Home » SQL & PL/SQL » SQL & PL/SQL » Dynamic query execution
Dynamic query execution [message #35899] Tue, 23 October 2001 00:54 Go to next message
Messages: 2
Registered: October 2001
Junior Member
Iam getting "Invalid Number" error while executing dynamic query with the help of DBMS_SQL package.
My query is :
for ex: v_list := "100,120,130,140";
select name from emp where empid in (v_list);

Actually the value of v_list will get from another SELECT statement ,like
"SELECT ids INTO v_list FROM table_name" .

I have to return this resultset to a java file.

Thanking you.

Re: Dynamic query execution [message #35924 is a reply to message #35899] Wed, 24 October 2001 07:17 Go to previous message
Messages: 43
Registered: February 2001
Try this :

select name from emp where empid in (SELECT ids v_list FROM table_name);

Previous Topic: DBMS_OUTPUT.PUT_LINE Limitation
Next Topic: Package and Package Body
Goto Forum:

Current Time: Sat May 18 21:43:16 CDT 2024