That didn't work.
 
Ted


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ramsour Mike
Sent: Tuesday, June 07, 2005 9:25 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: In clause of where statement

Ted:
 
Try referencing your variable like this:  WHERE year IN (&vyears)  -- Note the use of the ampersand instead of a "."
 
Hope that helps.
 
Mike Ramsour
-----Original Message-----
From: Ted Wolfley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 07, 2005 9:32 AM
To: [email protected]
Subject: [RBG7-L] - In clause of where statement

Hi,
 
This is probably really easy but I am having a hard time figuring it out.  I would like to have multiple text values entered in one dialog box with the text values separated by commas. The variable from the dialog box would then be used in the IN clause of a SELECT statement.  The statement works fine with one value but not more than one.  To use more than one text value in the IN clause, the text values must have single quotes around each value. 
 
Thanks
 
Example:
 
DIALOG 'Enter year(s) wanted separated by commas. example: 05 '=45 vyears=10 vendkey 1 CAPTION 'Month-end Year(s)' AT CENTER CENTER
 
SELECT SUM(quantity) INTO vtotal FROM table WHERE year IN (.vyears)

Ted Wolfley
Database/Internet Programmer
The Ogden Group of Rochester
phone: (585) 321 1060 x23
fax: (585) 321 0043
[EMAIL PROTECTED]

www.ogdengroup.com

 

Reply via email to