Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to select matched records?
Message
De
02/04/2004 05:41:38
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00891695
Message ID:
00891703
Vues:
31

Hi all,
I wish to select out some matched records in my given condition.
Such as a record has field "item_type" contains "RAW,WIP,FGD"
and some contain "RAW,FGD".... How to select all records matched
with "FGD" ? In Visual FoxPro, I can use "FGD" $ item_type, but it does not
accept $ in SQL syntax.
Can you help?


Use AT() SQL equivalent.
... where CHARINDEX('FGD', item_type)>0
I suggest you to use one surer outline ( a fixed separator out of data domain ):
"item_type" contains ",RAW,WIP,FGD,"

with this you can use variable lenght tags, like RAW and RAWW
"item_type" contains ",RAW,RAWW,WIP,FGD,"
... where CHARINDEX(',RAW,', item_type)>0
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform