Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> help about dynamical sql
Hi,all:
In my project:I have to use dynamical sql to create a trigger,
suppose in one of my tests of dynamical sql,date information is like this:
c_columnname='courses_score';
:new.courses_score=10;
fathertable=scores;
f_columnname=score;
Then when executing dynamically the following statement
select DESCRIPTIONl into variables_pkg.myinfo from '|| fathertable||'where '|| f_columnname||'=:new.'||c_columnname||'; we will get
select DESCRIPTIONl into variables_pkg.myinfo from scores where score=:new.courses_score; But if I want to get the following statement:
select DESCRIPTIONl into variables_pkg.myinfo from scores where score=10;
Then how to construct the dynamical sql?
Any idea?
Thank you in advance!
Best Regards
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jul 10 2006 - 09:45:04 CDT
![]() |
![]() |