Joel

The key is in the email earlier from Larry Lustig

When you use a CHOOSE command with the CHKBOX option, the variable is set to
a string of values separated by commas:

23,34,45

Queries with the IN  operator require that the values must be enclosed in
parentheses.

So before you can use the list in a WHERE clause you need this step:

SET VAR varname = ('('+.varname+')')

which changes varname to (23,34,45)

NOW you can say:
WHERE colname IN &varname


David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
From: "Joel Solomon" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 12:43 PM
Subject: [RBG7-L] - Re: Check Box


> Razzak,
>
> The tables are the same and the form has the ID's.
>
> When I use the command EDIT USING formname WHERE colname IN &varname,
> I get an error "parenthesis are required around the list for the in
clause".
> When I change the code to EDIT USING formname WHERE colname IN (&varname),
> I get the error that "no data is found".
>
>
> ----- Original Message -----
> From: "A. Razzak Memon" <[EMAIL PROTECTED]>
> To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, August 26, 2004 12:23 PM
> Subject: [RBG7-L] - Re: Check Box
>
>
> >
> > At 11:55 AM 8/26/2004 -0400, Joe Solomon wrote:
> >
> > >Razzak,
> > >
> > >Thanks for the code, but when I use EDIT USING formname
> > >WHERE colname IN (&varname)
> > >I get an error "No rows exist for the specified clause".
> > >When I replace &varname with the actual list of names,
> > >it works fine.
> >
> >
> > Joel,
> >
> > 01. Is the table used in the CHOOSE command the same for
> >      the primary table in the form?
> >
> > 02. You are collecting the IDs in the CHOOSE command
> >      variable. Does the form's *primary* table has those
> >      IDs?
> >
> > That should give you a few clues!
> >
> > Very Best R:egards,
> >
> > Razzak.
> >
>
>

Reply via email to