[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Feeding a where statement
- Subject: Re: Feeding a where statement
- From: "Turner, Ivan" <Ivan.Turner@QWEST.COM>
- Date: Thu, 12 Apr 2001 13:43:35 -0400
let $site =
'('''||ES-02||''','''||SM-01||''','''||PS-08||''','''||SM-02||''')'
-----Original Message-----
From: McCown, Larry [mailto:MCCOWLA@MAIL.NORTHGRUM.COM]
Sent: Thursday, April 12, 2001 12:06 PM
To: SQR-USERS@list.iex.net
Subject: Feeding a where statement
Hello,
Not sure how to state this but here it goes.
I am attempting to build a where statement that is fed from an if statement
using the in command.
Sample:
begin-procedure
if $site = 1 (user input as to which site)
move ''('ES-02','PS-08','SM-01',SM-02') '' TO $SITE
end-if
Begin-select
from workorder
where [$where]
and crewid in $site
end-select
end-procedure
I am receiving error (SQR 4114) Expecting 'to', found move
''('ES-02','PS-08','SM-01',SM-02') '' TO $SITE
If you were able to follow this and have any suggestions I would appreciate
it.
Thank you
SQLServer 7
VisualSQRIBE 5.0
Larry McCown
Northrop Grumman
Western Region Facilities
One Hornet Way WG00/W9
El Segundo, Ca. 90245
mccowla@mail.northgrum.com
Phone (310)628-3939
Fax (310)331-7452