Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Cursor problem
I have a fairly complicated SQL statement that was formaly a defined
View. I am trying to use the underlying select stmt, with host
variables, as the select for a cursor. The SQL works fine as stand alone
SQL and as the select for a view. However if I use it as the query for a
cursor I get an error on the line that is the first line of a sub-select
used for the "from" stmt (not a "where" stmt). The SQL has several
sub-selects and several unions. It is the only example of a sub-select
being used for a "from" stmt I can find. Is there some limit or rule
about this type of subselect being used in a cursor ? I have attached
the first several lines of the stmt. The entire stmt is about 60 lines
long and has 6 unions. The !! is the line I get the error on..
PLS-00103: Encountered the symbol "(" when expecting one of the following: <an identifier> <a double-quoted delimited-identifier>
cursor summary_cursor is SELECT Prod_Date, SUM(MCF_In) mcfin, SUM(Pack_Change_MCF) packmcf, SUM(MCF_Out) mcfout, SUM(DT_In) dtin, SUM(Pack_Change_DT) packdt SUM(DT_Out) dtout
This one has me baffeled (not that hard to do obviously). Any help would be much appreciated. Thanks in advance.. Reply to E:Mail also please. I sometimes can't get back to the newgroup before the replys are rolled off. Received on Tue Sep 29 1998 - 15:40:11 CDT
![]() |
![]() |