Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FIX: this bug fixing change the VFP behaviour a lot
Message
De
16/08/2005 14:59:19
 
 
À
16/08/2005 13:52:59
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 9
Divers
Thread ID:
01041266
Message ID:
01041421
Vues:
26
>Hi Fabio,
>
>I believe we already discussed this problem and you were given the answer (see message # 1022212). If you want to have control over how many times and in which order expressions should be evaluated, use a loop. I am really surprised that you still can't understand a simple thing - If you are using SQL statement, query processor chooses algorithm, NOT YOU. Under different circumstances, the same SQL statement may be executed using different algorithms. If result of a SQL statement evaluation has any dependency on a particular algorithm chosen by the query processor, there is a bug in the SQL statement and you should fix it. If there is no dependency on a particular algorithm then it doesn't really matter how many times and in which order expressions are evaluated because this doesn't affect the result.

Hello Aleksey,

Your message 1022212:
SQL statements are declarative. They describe what conditions should be met and how result values should be calculated. What they do not prescribe is how many times or in which order or even why a part of an expression is going to be evaluated. Therefore, one should not rely on those things.

I think you have written down some pretty important statements there and they worry me a lot!

Although we are ensured that 'we' are the ones who describe the conditions and how results should be calculated, SQL appears NOT to apply certain rules that 'we' are accustomed to.

1) how many times: 'We' assume that a function in a WHERE expression is called only once for each resulting record, but this assumption is asked too much.

2) in which order: 'We' assume that the right expressions separated by logical operators in a WHERE expression are evaluated only if the left expressions still justify that action, but this assumption is asked too much.

Who are 'we'? 'We' are the developers who apply certain wellknown VFP rules, as long as there is not an explicit warning in the documentation of Select-SQL that such a VFP rule does not apply.

Can you - officially, on behalf of Microsoft - confirm 1) and 2), and can you confirm also that the documentation would have been, at the least, better if it had stated these facts?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform