Dick,
When using LIKE you need to use either a single or multi wildcard character.
The following examples all work:
SET VAR xxx TEXT
SET VAR xxx = 'cc'
IF xxx BETWEEN 'AA' AND 'ZZ' THEN
PAUSE 2 USING '1- INSIDE IF'
ELSE
PAUSE 2 USING '1 - SKIP IF'
ENDIF
IF xxx LIKE '__' THEN
PAUSE 2 USING '2 - INSIDE IF'
ELSE
PAUSE 2 USING '2 - SKIP IF'
ENDIF
IF SLEN(.xxx) = 2 THEN
PAUSE 2 USING '3 - INSIDE IF'
ELSE
PAUSE 2 USING '3 - SKIP IF'
ENDIF
RETURN
It look like you are still using the old wildcard characters (? and *). The
examples above use the new characters, "_" and "%"
Javier,
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dick Fey
Sent: Monday, April 09, 2012 12:03 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - IF Like
Guess my old brain is getting fuzzy.
We use 2 letter codes for vendors (PH, QN,) etc.
I want to call a specific vendors form if 2 letters are entered, search
the whole table if more than 2 letters
Why does this code not work?
IF vvennum LIKE 'AA' THEN
IF vvennum LIKE '**' THEN
IF vvennum LIKE '??' THEN
IF vvennum between 'AA' and 'ZZ' THEN
None will call a specific vendor, it always goes on to the else, which
calls all vendors having those letters in the name
Old Fuzzy Brain,
Dick Fey