[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Dynamic Where Clause IN Sql Statement
Hi Sam,
Try this:
let $where = 'and post_status_ap in (''P'',''U'',''N'') AND etc '
(The quotes are all single quotes.)
>
begin-select
field1
field2
from table_name
where business_unit = $business_unit
[$where]
end-select
and then let $where =
'and ledger in (''ORG'',''AMD'') AND scenario = ''FINAL'''
etc.
Things don't get _really_ tricky until the literal contains a quote mark ...
Dave