CURSOR, SELECT INTO, UNION [message #374255] |
Sat, 02 June 2001 16:32 |
Louis Fortier
Messages: 1 Registered: June 2001
|
Junior Member |
|
|
I want to use Cursor based on this model
OPEN pListRole FOR
SELECT Field 1,
Filed2
INTO v1,
v2,
FROM XList
where...
UNION
SELECT Field1,
FIELD2
INTO v1,
V2
from XlIST x
WHERE...
A compilation error message appears when I use the second Into
(PLS-00103: Encountered the symbol "INTO" when expecting one of the following:
. ( , * @ % & - + / at mod rem
as
from)
Is it possible to use cursor this way ??
Louis
|
|
|
Re: CURSOR, SELECT INTO, UNION [message #374257 is a reply to message #374255] |
Sun, 03 June 2001 09:38 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi,
Keep your union as subquery like
SELECT Field 1,
Filed2
INTO v1,
v2,
FROM
(SELECT Field1, Field2
FROM XList
where...
UNION
SELECT Field1,
FIELD2
from XlIST x
WHERE...)
Bala.
|
|
|