[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Dynamic query



Do something like this:

let $where1 = 'and gtaward.fiscalyr = '  || '''' || $myear || ''''

let $where4 = ' and gtaward.granttype IN (' || '''' || $test1 || '''' || ',' || 
'''' || $test2 || '''' || ')'



>>> Alka Srivastava <asrivastava@KPMG.COM> 09/01 1:13 PM >>>
Let $AdjTypeCd = 'W-LATE'

 1. Let $Where_Clause_type_cd ='AND D.ADJ_TYPE_CD = ' ||
$AdjTypeCd
 2. Let $Where_Clause_Opr_Class = 'AND G.OPRCLASS NOT IN
($test1, $test2)'

This where clause is giving me error.

If I write it like this, it works fine.

Let $Where_Clause ='AND D.ADJ_TYPE_CD = ''TEST'''
Let $Where_Clause = 'AND G.OPRCLASS NOT IN ''TEST'''

What I am missing in the first two syntax.


Any help.


Thanks,
Alka