Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exact OFF Strrange Behaviour
Message
De
23/12/2003 03:34:18
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
Divers
Thread ID:
00861443
Message ID:
00861518
Vues:
18
>I am using SQL Statement which brings more records than I need because it behaves like SET EXACT OFF, here is my statement
>
SELECT code from items where alltrim(code) >= '140' and alltrim(code) <= '140'
>The Result sets contains records for item = '140' and item = '1404'
>I even tried to set exact on but with no change.
>Any Help on that

Hani,
As Frank and Trey said you should use 'set ansi' for SQL.
If your searching really like the above expression actually you don't need to check/set 'exact or ansi'. Use the == operator.
SELECT code from items where code == '140'
PS: Also alltrim() usage is unnecessary. Thinking alltrim() in an index is useless you wouldn't have such an index and thus you'd defeat Rushmore (where an index on code might exist).
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