Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - Multi State Exclusion
Message
De
07/03/1998 16:13:24
 
 
À
07/03/1998 07:37:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00083191
Message ID:
00083234
Vues:
14
If you're going to construct a list in a variable, you could use INLIST(): LOCAL aStateArray[1],cBadStateWhereCond,nCtr SELECT '"'+BadState+'"' FROM bad_st INTO ARRAY aStateArray cBadStateWhereCond = IIF(_TALLY > 0, '!INLIST(State,' + aStateArray[1], ".T.") FOR nCtr = 2 TO _TALLY cBadStateWhereCond = cBadStateWhereCond + ',' + aStateArray[nCtr] ENDFOR IF cBadStateWhereCond) # ".T." cBadStateWhereCond = cBadStateWhereCond + ")" ENDIF RELEASE aStateArray, nCtr SELECT * FROM x WHERE &cBadStateWhereCond > >I have a very intenstive app that has 100,000 records >that need to be evaluated one at a time for 25 different >conditions. > >One of the conditions is to check and see if any of 4 >state codes are contained within a field of the record. >I want a data driven solutoin since the states can expand >and contract. I can NOT do a simple SELECT * FROM >x where z NOT IN (sub select). > >What is the fastest non-hard coded way to perform this >type of query? The data in the bad_st table will be constant >for the duration of the program if that helps. I was considering >creating a character variable that is a comma separated >list. > >What are your thoughts? > Attachment Converted: Edward M Rauh.vcf
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
Répondre
Fil
Voir

Click here to load this message in the networking platform