I have 2 tables that I’m trying to combine in order to do a group by function on them. The reason I’m dealing with this issue is that combined the 2 tables are > than the 10 GB database limit in SQL Server Express (each is ~ 9 GB). The second table is just a continuation of the first. It looks like this:
CustId Sale
001 4.25
002 15.24
003 8.78
004 122.99
005 44.80
... ...
If it was one table I’d just use something like this:
select CustId, sum(Sale) sumSale
from table1
group by CustId
Is there a way to combine lengthwise instead of width-wise?
You can use a
union: