[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Dynamic query
- Subject: Re: Dynamic query
- From: "Turner, Ivan" <Ivan.Turner@QWEST.COM>
- Date: Fri, 1 Sep 2000 12:35:13 -0600
!Let x = 'AND col NOT IN (~~' || $var1 || '~~, ~~' || $var2 || '~~ )'
Begin-Program
Let $V1 = 'H'
Let $V2 = 'S'
Let $Where = 'AND INVGP_CD_L NOT IN (''' || $V1 || ''',''' || $V2 || ''' )'
Show '$Where = ' $Where
End-Program
-----Original Message-----
From: Charlene McGrath [mailto:CHARLENE@MAIL.GSFC.STATE.GA.US]
Sent: Friday, September 01, 2000 1:32 PM
To: SQR-USERS@list.iex.net
Subject: 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