grouping results

  • Thread starter Bakr Z via AccessMonster.com
  • Start date
B

Bakr Z via AccessMonster.com

Hi to all,
I've created a query using UNION ALL statement in this way:

SELECT item, SImported, SExported
FROM [SELECT item,sum(import) AS SImported, null AS SExported
FROM imported group by item
UNION all
select item, null as Simported,sum(export) as SExported from exported
group by item]. AS x;

The result will be like this:

item SImported SExported
2 68
3 52
1 57
2 11

How can I group the "item" field be like this? :

item SImported SExported
1 57
2 68 11
3 52
 
Top