I have simply written CASE statement in the procedure as below
(case when (T1.DEVICEHOLD = 'Z1' or T2.ISHOLD = 1) then 1 else 0 END) AS HOLD
But when I'm compling procedure its giving an error Compilation errors for PACKAGE BODY
Error: PLS-00103: Encountered the symbol "Z1" when expecting one of the following: * & = - + ; at in is mod remainder not rem or != or ~= >= and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_ The symbol "* was inserted before "Z1" to continue.
Could anyone help me to resolve this?
Thanks in advance!
This is a compiler error. The most likely cause is a stray '
somewhere which means that the first '
in your snippet terminates a quoted string and so the compiler considers Z1
to be code, and not valid as such.
The easiest way to spot such things is to use a decent editor or IDE which has syntax highlighting. These tools colourize quotes, keywords and comments and so make it easy to spot where we have made our bloomers. There are plenty of free tools available: Notepad++ or Oracle SQL Developer are popular options.