Is there any way of executing to non dependant select statements in one query, so like the result query contains the fields of two select statements. Something like select...AND select...
So your results will be six columns. Are the first columns from one table, and the last columns from another table? Or are all six columns found in both tables? Give me an example of the tables you are querying and the results you are hoping for.
ok, they are a bit complex but basically its this.
SELECT City, Sum(CountOf)
FROM [Select City1 as City, count(*) as CountOf from testTable group by City1 UNION ALL Select City2, count(*) from testTable group by City2)
GROUP BY City
and
SELECT Country, Sum(CountOf)
FROM [Select Country1 as Country, count(*) as CountOf from testTable group by Country1 UNION ALL Select Country2, count(*) from testTable group by Country2)
GROUP BY Country
So all fields are in the same table and the result woould be four fields: City, Expr1, Country, Expr2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.