Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LIKE ('4*-8002') works, LIKE('4??-8002') doesn't
Message
From
05/11/1999 09:11:36
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00287283
Message ID:
00287445
Views:
20
>
>I don't know what's happening here, but you might find that changing your SELECT statement to use the native ANSI SQL LIKE clause, which functions in much the same way that LIKE() operates, but with different wildcards, rewriting would look like:
>
>SELECT COUNT(*) FROM PyrlDist WHERE FUND LIKE "4%%-8002"
>

Wouldn't that be "4__-8002"? Underscore for any single char, percentage sign for zero or more characters (multiple).

>should give the same result as
>
>SELECT SUM(IIF(LIKE('4??-8002',Fund),1,0)) FROM PyrlDist
>
>You'd have to show the full query as well; if you have a GROUP BY clause, the WHERE expressions may not be getting evaluated when you think it is...like after the grouping occurs, when the instance values got 'lost in the sauce'.
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform