Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing SQL UNION
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01308521
Message ID:
01308660
Views:
10
Naomi,

Thanks for the suggestion, just needed to add the cursor names as follows and all worked fine in fox:
select * from (select TOP 1 * from Master where ... ORDER BY...) curMaster ;
UNION all ;
select * from (select TOP 1 * from Archive where ... ORDER BY...) curArchive
Unfortunately ADO has it's own issues and doesn't like that SQL, it returns:
Microsoft OLE DB Provider for Visual FoxPro error '80040e14' 

Only a single SQL SELECT statement can be enclosed in parentheses. 
Is there likely to be something different in the data environment between VFP and ADO that I can change?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform