Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: SQL: Error correlating fields.
Message
From
01/04/2005 02:39:09
Walter Meester
HoogkarspelNetherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
BUG: SQL: Error correlating fields.
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01000537
Message ID:
01000537
Views:
267
VFP9 the error when executing the command below:

SELECT trm_acu_id as Acu_id, trm_cycleno as Cycleno,  trm_partner as Partner, Trm_ovumdonor as Ovumdonor, ;
trm_semdonor as semdonor, trm_ovumcycle as Ovumcycle ;
FROM t_Treatmen Tr ;
WHERE ( EXISTS (SELECT Prn_acu_id AS Acu_id FROM t_prognotes T, t_progdets ;
WHERE Prn_acu_id = Tr.Trm_acu_id AND prn_enc_cycle = tr.trm_cycleno AND Prd_Numvalue > 200 AND ;
prd_mdsfk = 70105 AND prn_enc_id = prd_enc_id) OR ;
EXISTS(SELECT Prn_acu_id AS Acu_id FROM t_prognotes T, t_progdets ;
WHERE prn_acu_id = tr.trm_acu_id AND prn_enc_id = prd_enc_id AND prn_enc_cycle=SPACE(10) ;
AND Prd_Numvalue > 200 AND prd_mdsfk = 70105 ))


This command runs without any problem in VFP8. The error occurs regardless of SET ENGINEBEHAVIOR.
Interestingly when I change the OR operator between the two EXISTS into AND, to runs without a problem

A real showstopper in my app as these kind of SQL occur frequently.

Walter,
Reply
Map
View

Click here to load this message in the networking platform