Hi,
I've two separated queries that both return two columns: the first one returns NAMES | #ORDERS, and the second one NAMES | #SALES
I would like to merge those two queries to one query with the columns like that: NAME | #ORDERS | #SALES.
I tried to add the missing column on each query with a value to 0 and then make an UNION between the two queries but I get 2 rows for each name: NAME | 0 | #SALES and NAME | #ORDERS | 0. I want to merge that to get only one row per name.
Can anyone tell me how to do that please? Hope I was clear enough...
Thanks
I've two separated queries that both return two columns: the first one returns NAMES | #ORDERS, and the second one NAMES | #SALES
I would like to merge those two queries to one query with the columns like that: NAME | #ORDERS | #SALES.
I tried to add the missing column on each query with a value to 0 and then make an UNION between the two queries but I get 2 rows for each name: NAME | 0 | #SALES and NAME | #ORDERS | 0. I want to merge that to get only one row per name.
Can anyone tell me how to do that please? Hope I was clear enough...
Thanks