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 -> Re: Subquery in Select

Re: Subquery in Select

From: Mike Burden <michael.burden_at_capgemini.co.uk>
Date: Wed, 03 Mar 1999 15:28:47 +0000
Message-ID: <36DD552F.259B50FA@capgemini.co.uk>


Hmmm ....the is answer is no, in Oracle.

Does any other RDBMS support this?

Stefan Sandow wrote:

> 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 - 09:28:47 CST

Original text of this message

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