Dear Bruce,
I don't have a copy of R:Base available right now, so I can't test, but
can you select your dynamic content into a variable, and then do your IF?
SELECT <mystuff> INTO vmylist FROM...
IF vHumpty NOT IN (.vmylist) ...
Jason
________________________________________
From: [email protected] [[email protected]] on behalf of Bruce A. Chitiea
[[email protected]]
Sent: Friday, July 26, 2013 1:14 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - SELECT not allowed within IF statement
All:
What I need to do is test a variable against a list of values within an IF
statement.
This works:
IF vHumpty NOT IN +
('JAN','FEB','MAR', ... 'DEC') THEN
I'd rather avoid hard-coding the values; preferring to pull values
dynamically.
All the following attempts fail, producing this error message:
'-ERROR- Sub-SELECTs are not supported by this command. (2310)'
This fails:
IF vHumpty NOT IN +
(SELECT CalMonthAbbr FROM zMonth) THEN
As does this:
SET VAR vDumpty TEXT = +
'(SELECT CalmonthAbbr FROM zMonth)'
IF vHumpty NOT IN +
&vDumpty THEN
As does this:
SET VAR vGrimmBros TEXT = +
'(SELECT CalMonthAbbr FROM zMonth)
SET VAR vDumpty TEXT = .vGrimmBros
IF vHumpty NOT IN +
&vDumpty THEN
It must be real simple. I'm just not seeing it.
TIA
Bruce