Home » SQL & PL/SQL » SQL & PL/SQL » select query (10g)
select query [message #612229] Mon, 14 April 2014 22:28 Go to next message
foopaloop
Messages: 1
Registered: March 2010
Junior Member
Dear all

I am new to sql programming and I need some help. I would like to know how can I take the output of one select statement and use it as an input for another query. Do I need to use a stored procedure for this?

Please let me know if you would like to see the code that I'm using at the moment.

Thanks
Re: select query [message #612230 is a reply to message #612229] Mon, 14 April 2014 22:40 Go to previous message
BlackSwan
Messages: 22810
Registered: January 2009
Senior Member
Welcome to this forum.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and please read http://www.orafaq.com/forum/t/174502/102589/

If you know neither SQL nor PL/SQL, you are biting off more than you can chew.

Is below close to what you want to do?

SQL> select ename from emp where deptno in (select deptno from dept where dname = 'SALES');

ENAME
----------
WARD
TURNER
ALLEN
JAMES
BLAKE
MARTIN

6 rows selected.


Previous Topic: (non)Matching nulls
Next Topic: how to remove columns not ending with leaf nodes in hierarchical queries
Goto Forum:
  


Current Time: Tue Sep 23 23:58:37 CDT 2014

Total time taken to generate the page: 0.09102 seconds