Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Subquery on SELECT clause

Subquery on SELECT clause

From: John Chaves <john.chaves_at_us.pwcglobal.com>
Date: Mon, 30 Nov 1998 15:05:54 -0000
Message-ID: <73uu45$305$1@camel29.mindspring.com>


I am trying to retrieve a description value from a table while querying another but I can't get the SQL text
right. For example, I need the order_id and the employee name instead of its id.

SELECT order_id,
(SELECT emp_name FROM Employees WHERE Employees.emp_id = Orders.emp_id) AS "Name"
FROM Orders
WHERE order_Item = 'soap'

The SQL works fine in SQL Server or Access, with minor modifications.

Can you help ?

john.chaves_at_us.pwcglobal.com

Thanks Received on Mon Nov 30 1998 - 09:05:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US