Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LIKE ('4*-8002') works, LIKE('4??-8002') doesn't
Message
De
05/11/1999 10:13:24
 
 
À
05/11/1999 09:11:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00287283
Message ID:
00287506
Vues:
19
>>
>>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).
>

Yep - I shouldn't try to answer stuff late at night! Thanks for correcting it.

>>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'.
>>
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform