Using Concatenation in a where clause
633368Feb 26 2010 — edited Mar 1 2010I have set variables
:P1 := 'and c.contr_id ='||:F184_CAGE;
:P2 := 'and d.delq_rsn_cd = ' ||:F184_REASON_CD;
Later I want to use those in with a select statement
select a.PIIN,
a.CLIN_CONT_SUBLIN,
a.clin_prg_cd,
b.TY_FUNDS,
b.PROC_EL,
c.CONTR_ID,
d.DELQ_RSN_CD
from clin_admin a, pron_admin b, piin_admin c, delq_reasons d
where a.PIIN = b.PIIN and a.PIIN = c.PIIN and a.PIIN = d.piin_call ||:P1||:P2;
the where clause does not recognize the variables. I get no error...is as if they don't exist. Can someone please explain??
Thanks
Mark E