Me too...

I seem to remember having problems when the selected items had spaces or
embedded quote marks such as O'Neal.

I now always use code such as:

CHOOSE vemp_code FROM #VALUES for +
DISTINCT (LJS(emp_sname,22) + LJS(slot_no,10)), +
(''''+ slot_no +'''') FROM emp_file CHKBOX 30 +
TITLE 'Available Employees'  CAPTION 'Select Up to 30 Employees...'  +
... more code...

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

Which always return the list of items individually surrounded by quotes and
the expression in between parentheses.

Now I can use it in expression such as:

COMPUTE vcount AS COUNT fwo_no FROM fwo_labor_view WHERE fwo_stat = 'C' +
AND slot_no IN &vemp_code AND +
fwo_labor_date BETWEEN .vfrom_date AND .vto_date
...more code

And it works correctly every time.

Javier,

Javier Valencia, PE
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
 -----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Friday, February 05, 2010 1:52 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Interesting Error message

Also, I have standardized on using quoted text values in my IN clauses
because then RSTYLE will not pick them up as new words and will not change
them in any way. RSTYLE basically takes a hands off approach to quoted text
and numbers.

Dennis McGrath


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Friday, February 05, 2010 1:11 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Interesting Error message

At 01:40 PM 2/5/2010, Rachael Malberg wrote:

>actually I bet it doesn't like your "in" string.
>try...('020402ga','020411ne','020416ks')

No.

The "IN" string should not be a problem.

To test and understand how R:BASE intelligently parses the "IN" string, try
the following two examples:

-- Example 01:

CONNECT RRBYW16
PRINT INVOICE WHERE CustID IN (100,105,127) OPTION SCREEN

-- Examnple 02:

CONNECT RRBYW16
PRINT EmployeeList WHERE EmpLName IN (Wilson,Smith,Hernandez) OPTION SCREEN

Notice that in both examples, with INTEGER and TEXT items in "IN" clause,
the WHERE parameters are evaluated accordingly.

That is your tip of the day!

Very Best R:egards,

Razzak.


Reply via email to