Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: INSERT nextval and UNION SELECT result?
An Application Developer's Guide citation:
CURRVAL and NEXTVAL cannot be used in these places:
a subquery
a view's query or snapshot's query
a SELECT statement with the DISTINCT operator
a SELECT statement with a GROUP BY or ORDER BY clause
a SELECT statement that is combined with another SELECT statement with the
UNION, INTERSECT, or MINUS set operator
the WHERE clause of a SELECT statement
So You only can try something as
INSERT into table
( dupcheckid, ... )
(select
field1, ... union select field1,
![]() |
![]() |