Dear Sir:
I have a question related to dynamic statement
As shown below, I have a select statement for data in three tables
The GUI has three input fields. Their value can not be determined before
hand.
Besides of doing the join of the tables, I want to have a dynamic where
clause so that the where
clause syntax is determined by the value in the fields.
The statement below does not run well.
How can I fix it ?
Thanks,
John Chien
*****************************************************************************************
SELECT ---------------------------------------------- (Omit)
FROM EH.BETS_PAYMENT p, EH.BETS_CORPORATION c, EH.BETS_ADDRESS a
WHERE p.CORP_ID = c.CORP_ID AND c.CORP_ID = a.CORP_ID AND
(
<dynamic>
<isNotEmpty prepend="OR" property="fields[0].value" >
p.PMT_FISCAL_YR = #fields[0].value#
</isNotEmpty>
<isNotEmpty prepend="or" property="fields[1].value" >
p.PMT_DEPOSIT_DT = TO_DATE(#fields[1].value#,
'MMDDYYYY')
</isNotEmpty>
<isNotEmpty prepend="or" property="fields[2].value" >
c.CORP_ID = #fields[2].value#
</isNotEmpty>
</dynamic>
)
***********************************************************************************************
begin:vcard
fn:John Chien
n:Chien;John
email;internet:[EMAIL PROTECTED]
tel;work:919-715-2510
version:2.1
end:vcard