Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wildcard searching in SQL 7.0
Message
De
08/12/2000 14:08:31
 
 
À
08/12/2000 14:02:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00450892
Message ID:
00450908
Vues:
28
>>Trey,
>> See my reply to Larry.
>>
>>..where zip in ('220461934','220461973','22030')
>>
>>I tried
>>
>>..where zip in ('220461934','220461973','22030%')
>>
>>but it doesn't work. :(
>
>I was just about to address this, e.g., in your caller - assuming VFP for this -set the zip values to PADR(lcZip,9,"_") and make the SQL call sim to this (I modified pubs.authors to have 9 digit zip code - the ones below have multiple records already - I changed one each to be 9 and left the rest at 5)
select au_id, au_lname, au_fname, zip
>   from authors
>   where 1 in (patindex('84152____',zip), patindex('94301____',zip))
If you try this with pubs, the Check constraint also needs to modified on the zip field to add 4 [0-9 ] (there is a space after 0-9) to the contstraint.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform