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

Home -> Community -> Usenet -> c.d.o.tools -> Multiple recordsets in 1 select

Multiple recordsets in 1 select

From: Gerry Jacobs <gee_jay__at_yahoo.com>
Date: 6 Jun 2001 00:34:45 -0700
Message-ID: <ce2b54c8.0106052334.3e20f062@posting.google.com>

Hello,

In MS SQLServer, I'm able to execute a query like this:

SELECT (SELECT account FROM docs WHERE id=596 and type='sales')
"accSales" ,

       (SELECT account FROM docs WHERE id=596 and type='it')
"accIT" ,

       (SELECT account FROM docs WHERE id=596 and type='mech')
"accMechanics"

I get a result like this:

accSales             accIt                accMechanics
-------------------- -------------------- --------------------
John Savage          Bjorn Vandael        NULL


When I run this query in Oracle, I get an error message:

.ORA-00923: FROM keyword not found where expected

I understand this error and I think the query isn't standard SQL, but if such a query can be run in MS SQLServer, I guess it should somehow also be possible in Oracle.
Anyone a clue?

Thanks,

Gerry Jacobs Received on Wed Jun 06 2001 - 02:34:45 CDT

Original text of this message

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