Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is BETWEEN() as fast as greater or less than?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01505871
Message ID:
01505917
Vues:
63
>>>>I thought this syntax only works for SQL Server. Thank you.
>>>>
>>>>>The correct syntax is
>>>>>
>>>>>SELECT * FROM MyTable where  PK_FLD BETWEEN nLow AND nHigh
>>>>>
>>>>>
>>>
>>>It's because it works in SQL Server that it's the only syntax you should use. When you're righting SQL in VFP, use good SQL unless you have no choice. :)
>>>
>>>There is no speed difference. BETWEEN is converted.
>>
>>I am changing to use this syntax. Thank you.
>
>BETWEEN and your original query are not the same, as BETWEEN is inclusive and your first query was border values exclusive.
>As for the syntax, if you have syntax that works in both SQL Server and VFP, then always use the SQL Server compatible syntax
>
>Field BETWEEN MinVal and MaxVal (MinVal and MaxVal will be included).

Thank you for clarifying the difference.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform