Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: SQL: Error correlating fields.
Message
From
01/04/2005 13:38:15
 
 
To
01/04/2005 13:03:20
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01000538
Message ID:
01000771
Views:
33
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform