Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select as good as can be?
Message
De
17/12/2004 11:30:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
00969535
Message ID:
00970081
Vues:
18
>it has to exact match "100" yet there may be spaces in the field so I believe it's necessary.

The way I posted is for exact match no matter how many trailing spaces exist (not spaces on start but at end). ie:

lcCust_id1 = "ALFKI"+space(100)
lcCust_id2 = "ALFKI"

select * from customer where cust_id == lcCustId1
select * from customer where cust_id == lcCustId2
select * from customer where left(trim(cust_id),5) = lcCustId2

All return the same result (for ALFKI only even if there where a ALFKIA)
For nonexact match you can use = operator instead of == operator (== is ANSI setting independant).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform