Using "macro substitution" in PL/SQL for D2000 [message #315643] |
Tue, 22 April 2008 05:10 |
irvs79
Messages: 7 Registered: April 2008
|
Junior Member |
|
|
Hello,
I am currently learning D2000. I just want to know if PL/SQL is capable of "macro substituion" wherein a command/literal can be manipulated dynamically during runtime? For example, an SQL statement for a CURSOR that can have various "WHERE" clause depending on satisfied conditions.
[Updated on: Tue, 22 April 2008 05:12] Report message to a moderator
|
|
|
|
Re: Using "macro substitution" in PL/SQL for D2000 [message #315917 is a reply to message #315665] |
Wed, 23 April 2008 04:10 |
irvs79
Messages: 7 Registered: April 2008
|
Junior Member |
|
|
Hi Michel,
Dynamic SQL was great! However, when I tried using "TYPE .. IS REF CURSOR" in declaring my cursor, the application is producing an error at runtime. It says that the identifier must be declared. The code was something like this:
declare
TYPE EmpCurTyp IS REF CURSOR;
curSearch EmpCurTyp;
The message says "curSearch must be declared". Also, the "OPEN curSearch FOR cCurStr USING P_TCU_ID, P_TCU_NAME;" line is producing an error. It says that the feature is not available in Client side applications. Seems like this approach is for Database Stored Procedures only.
The problem is, I want to use Dynamic SQL in processing form details. Is this possible?
Your help is greatly appreciated.
Thanks,
Irvin
|
|
|
|