Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> why does sub select in DECODE not work in a procedure
I am not sure if I am doing something wrong or if it is a "feature" in
Oracle.
I created a rather long and complex SQL statement using decode, but once I put it inside a procedure I get an error about the SELECT inside the decode. It runs perfectly fine with out the procedure but I need it inside a stored function.
I made the SQL into the most basic I could think of that reproduces the behavior. So the information is obviously junk, the concept is fairly similar, but shoudl be able to run it from any Oracle Db.
Oracle Version: 8i (8.1.7.4.0)
Any information or assistance apreciated.
SQL/procedure/error are below:
(SELECT USER FROM DUAL), 'MATCH', 'NO MATCH' )
(SELECT USER FROM DUAL), 'MATCH', 'NO MATCH' )
ORA-06550: line 5, column 19: PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
ORA-06550: line 5, column 41: PLS-00103: Encountered the symbol "," when expecting one of the following:
ORA-06550: line 7, column 5: PLS-00103: Encountered the symbol "INTO" when expecting one of the following:
![]() |
![]() |