Merge results from a query
Posted on 2004-11-23
I really feel I am missing something obvious here but this is a summary example of our problem.
We have a query that returns two columns - Account and Value. We run this query 6 times passing different values into it which changes the return of "Value" and is grouped by Account.
When we run this as 6 independant queries in SQL Analyser (all at once) the values are returned within 3 seconds. When we start trying to JOIN the tables it takes 14 seconds so I am trying to discover a way of merging the results from all 6 queries on one line grouped, again, by Account.
Hope that makes some sense.