Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: SELECT UNION bad fieldname with a order pass
Message
From
05/09/2005 16:31:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
BUG: SELECT UNION bad fieldname with a order pass
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01046830
Message ID:
01046830
Views:
50
when VFP apply a ORDER pass ( it do this also to make the distinct pass )
VFP build a new cursor
but it uses the names of the fields of the last select
in the case these is present:
CREATE CURSOR AA (MM I)

SELECT 1.00 X1,.f. X2 FROM AA;
UNION ALL;
SELECT 1.00 Y1,.T. Y2 FROM AA

SELECT 1.00 X1,.f. X2 FROM AA;
UNION ;
SELECT 1.00 ,.T. FROM AA

* FIELD NAMES = Y1,Y2
SELECT 1.00 X1,.f. X2 FROM AA;
UNION ;
SELECT 1.00 Y1,.T. Y2 FROM AA

* FIELD NAMES = Y1,Y2
SELECT 1.00 X1,.f. X2 FROM AA;
UNION ALL;
SELECT 1.00 Y1,.T. Y2 FROM AA ORDER BY 2
Next
Reply
Map
View

Click here to load this message in the networking platform