Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: SQL: Error correlating fields.
Message
De
01/04/2005 13:38:15
 
 
À
01/04/2005 13:03:20
Walter Meester
HoogkarspelPays-Bas
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:
01000538
Message ID:
01000771
Vues:
35
>>Others invariant forms:
>>
>>CREATE CURSOR orders (ord_pk I, ord_dummy C(10))
>>CREATE CURSOR Orderlines (orl_pk I, orl_ordfk I, orl_itmfk I)
>>CREATE CURSOR Items (itm_pk I, itm_name C(10))
>>* fail
>>SELECT * FROM orders O ;
>>	WHERE EXISTS(SELECT 1 FROM orderlines INNER JOIN Items ON orl_itmfk = itm_pk ;
>>		WHERE orl_ordfk = O.ord_pk AND itm_name = "BIKE") OR ;
>>	EXISTS(SELECT 1 FROM orderlines INNER JOIN Items ON orl_itmfk = itm_pk ;
>>		WHERE orl_ordfk = O.ord_pk AND itm_name = "SCOOTER")
>>* fail
>
>Yep this is the bug
>
>
>
>SELECT * FROM orders O ;
>>	WHERE EXISTS(SELECT * FROM orderlines INNER JOIN Items ON orl_itmfk = itm_pk ;
>>		WHERE orl_ordfk =O.ord_pk  AND itm_name = "BIKE" OR orl_ordfk = O.ord_pk AND itm_name = "SCOOTER")
>
>This also fails in VFP8 because of the OR in the EXISTS().
>
>
>Walter,

Walter,
This is the new VFP9's issue ( i predict this 1 year ago ).
On VFP9 do not exists a Invariant Relational Algebra normalizer,
then for complex SELECT forms you have to write the SELECT and try it,
the syntax analysis is not sufficient;
another relevant issue is that two equivalent syntax can run with two
differents complexity execution time (ex. O(nlogn) and O(n*n)).

A stress.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform