Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do this in View.
Message
From
10/07/2003 06:29:04
 
 
To
10/07/2003 05:06:22
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00808770
Message ID:
00808780
Views:
9
Hi,

I'm useless at SQL and I'm sure there's a simpler way but the following should work:
SELECT tablea.service as totalSalesService,tablea.name from tablea ;
WHERE NOT  tablea.name in (Select tableb.name FROM tableb) ;
UNION ;
Select tableb.sales as total,tableb.name FROM tableb;
WHERE NOT tableb.name in (Select tablea.name FROM tableA);
into CURSOR tmp

SELECT tablea.service+tableb.sales as TotalSalesService,tablea.name;
 FROM tablea INNER join tableb ON tablea.name = tableb.name;
 UNION;
 SELECT * FROM tmp;
 ORDER BY 2
Regards,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform