Than you for your reply, I'm still haveing a bit of trouble though...
This is the statement I tried:
select KEYCODE,
count([Order Number])as Orders,
sum([Invoice Total Shipped])as AmountTotal
from
(select keycode,
[Order Number],
[Invoice Total Shipped]
from DW_BILLINGHEADER
union all
select keycode,
[Order Number],
[Invoice Total Shipped]
from DW_ORDERHEADER)
group by Keycode
and I get:
Server: Msg 156, Level 15, State 1, Line 27
Incorrect syntax near the keyword 'group'.
SQL2000 isn't likeing the selects after the "From"
I know the union works, because I ran that by itself and it works.