Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by in union
Message
De
23/03/2017 12:02:16
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
 
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 SP2
OS:
Windows Server 2012
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01649254
Message ID:
01649272
Vues:
71
While I think that often CPUs are given cruel treatment by us, this is a case where I'd abstain from formulating the query in 1 SQL statement unless "forced" by execution times being much shorter if using singular statement.

A sele * from unionedcursor order by is certainly unambiguos at the cost of doubled writing. Otherwise I'd argue for trying to find a SQL heavy on brackets that performs well - this should be safer if trying to run on another engine. And won't fool the author if read again 9 months later ;-)





>Hi all,
>the code below works but I need to add in an order by field1, field2 but I can't get it to work, I get an order by error. I've tried a simple order by command but no joy, also tried moving between engine behaviour 70/80/90 with no luck. Any help appreciated.
>~M
>
>
>sele FIELD_LIST ;
>	from TBALE1 ;
>		join TABLE2 ;
>		join TABLE3 ;
>	where something ;
>		AND something else ;
>	UNION ;
>sele FIELD_LIST
>	from TBALE1 ;
>		join TABLE2 ;
>		join TABLE3 ;
>	where something ;
>		AND something else ;
>	into cursor temp2 nofilter
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform