From: gee_jay_@yahoo.com (Gerry Jacobs)
Newsgroups: comp.databases.oracle.misc
Subject: Multiple recordsets in 1 select
Date: 6 Jun 2001 00:34:45 -0700
Organization: http://groups.google.com/
Lines: 31
Message-ID: <ce2b54c8.0106052334.3e20f062@posting.google.com>
NNTP-Posting-Host: 212.65.37.180
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 991812885 15906 127.0.0.1 (6 Jun 2001 07:34:45 GMT)
X-Complaints-To: groups-support@google.com
NNTP-Posting-Date: 6 Jun 2001 07:34:45 GMT


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

