Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Subquery on SELECT clause
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