Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Re: SWQL Union command is only showing the first select query

$
0
0

MIght be best to post your swql or even better- do it first in sql to confirm your compliant then try to translate to SWQL- I find this removes a lot of trouble where SWQL just doesn't Like my functions But the script is fine.


Rules to union data:

  • Each query must have the same number of columns
  • Each column must have compatible data types
  • Column names for the final result set are taken from the first query
  • ORDER BY and COMPUTE clauses can only be issued for the overall result set and not within each individual result set
  • GROUP BY and HAVING clauses can only be issued for each individual result set and not for the overall result set
  • use a NuLL for any columns needed so you have an equal number of columns in each section

 

http://www.mssqltips.com/sqlservertip/1387/joining-data-using-union-and-union-all-in-sql-server/


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>