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

Home -> Community -> Usenet -> c.d.o.server -> Subquery in Select

Subquery in Select

From: Stefan Sandow <stefan.sandow_at_gmx.de>
Date: Wed, 3 Mar 1999 15:51:30 +0100
Message-ID: <7bji3c$6qv$1@black.news.nacamar.net>


Please read the two questions and answers that I have copied from the newsgroups archive, and give me a right answer. I know there is always a
*workaround*, but I want to do it straight. So: DOES Oracle support the
questioned syntax or not? I've searched the doc's and the newsgroups, but didn't find any peace of code that answered the question.

Thanks in advance!
Stefan

**
**Hello,
**
**I'm new to Oracle DB's (and this newsgroup), so forgive me if this
question
**was already asked and answered a hundred times...
**
**To my knowledge, Oracle doesn't support subqueries in the field selection
**list. Is this still true with current releases? If so, what work-arounds
do
**you use to achieve similar results? If not, what release of Oracle
supports
**subqueries within the SELECT statement?
**
**Thanks for any info you can provide.
**
**
**Allen Worthington

>Subqueries within field selection lists, or in-line views as ORACLE terms them,
>are available with ORACLE. I'm not sure whether it was in 7.2 or 7.3 of ORACLE

>that they arrived, but I think it was 7.2
>
>HTH
>  Rob


**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.
>this would simply be:select order_id, emp_name "Name"from orders, employees
>where employees.emp_id = orders.emp_idand order_item = 'soap'
>



Received on Wed Mar 03 1999 - 08:51:30 CST

Original text of this message

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