[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Dynamic Where Clause IN Sql Statement -Reply
- Subject: Dynamic Where Clause IN Sql Statement -Reply
- From: Ashok Datta <adatta@DOAS.STATE.GA.US>
- Date: Wed, 9 Jun 1999 20:10:20 -0400
Hi Sam
Depending on the user input you move the appropriate value in your
WHERE clause. Here is a example:
Let $Q = ''''
Let $Where_Match_Amounts =
'abs(MONETARY_AMOUNT2) ' || '= abs(MONETARY_AMT_VCHR)'
Let $Where_Cash_Actuals =
'AND DST_ACCT_TYPE IN ' || $Q || 'CAS' || $Q
SELECT *
FROM TABLE_NAME
WHERE [$WHERE_MATCH_AMOUNTS]
[$WHERE_CASH_ACTUALS]
I hope it will help. Thanks