Hello all.
I'm trying to use a CASE statement in a SELECT statement. It works fine as long as I just running the SQL from the command prompt. When I try to put the SQL statment in a procedure, I get an error on when it tries to compile the CASE statement.
I read once that the CASE statement doesn't work in PL/SQL, only SQL. So I tried to put the SQL statement in a string variable, and then execute it using EXECUTE IMMEDIATE.
Problem is, the SQL statement is 25,000 characters long. Is there a string variable that can hold that many characters. I tried:
and
(this one obviously won't work!!)
and I keep getting an error about an identifier being too long. I guess that means the variable can't hold the string.
Any suggestions?
Many thanks.
-Mike Kemp
I'm trying to use a CASE statement in a SELECT statement. It works fine as long as I just running the SQL from the command prompt. When I try to put the SQL statment in a procedure, I get an error on when it tries to compile the CASE statement.
I read once that the CASE statement doesn't work in PL/SQL, only SQL. So I tried to put the SQL statement in a string variable, and then execute it using EXECUTE IMMEDIATE.
Problem is, the SQL statement is 25,000 characters long. Is there a string variable that can hold that many characters. I tried:
Code:
lngSQL longraw;
Code:
lngSQL varchar2(4000);
and I keep getting an error about an identifier being too long. I guess that means the variable can't hold the string.
Any suggestions?
Many thanks.
-Mike Kemp