Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle - SQL question embedded select with aggregate function
The following select statement is giving me some problems in Oracle, yet it
is valid in both MSSQL server and Sybase SQL server.
select (select (max(orgid) + 1) from orgs), 0, company, 1, full_desc, effdt, '12/31/2099' from wrktbl_orgs_9 wk9
The problem, I believe, is the embedded select of the select max(orgid). I'm trying to make a generic sql statement to run on multiple platforms and generate a unique number by adding 1 to the max column value.
Any insights would be most appreciated! Received on Wed Dec 09 1998 - 20:43:59 CST
![]() |
![]() |