Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SubSelect Statement in Select List????
I've just come off a large SQL-Server project and am getting back to Oracle
(8.0.4). I'm having a little trouble remembering Oracle syntax vs SQL-Server
syntax.
In SQL server I can do the following:
Select
a.Name,
'Cost' = (Select sum(amount) from PayDue B where B.name = A.name),
a.Address,
...
from
Names A
How do you put a subselect into the Select list in Oracle? I can put one in the where clause with no problem but I can't seen to do it in the select listing.
Alan
P.S. The example above is made up. I certainly know that I can use a join and groupby to get the same info. The example was just given to show how a subselect in the select list can be done in SQL Server Received on Wed Sep 16 1998 - 10:42:56 CDT
![]() |
![]() |