Hi Everyone, I have the following Table A and Table B.
I tried doing a full outer join in Tableau software but was not successful.
Could i please check if my desired output below is possible?
I did not include my code because i uses Tableau to do a auto full outer join with my common key as Store.
I wish to do this in SQL 2008
louislsh
use union
select [Sales Date], Store, Product, Sold, cast(Null as Int) As SOH From TableA
union all
select Null As [Sales Date], Store, Product, Null As Sold, SOH From TableB
I Have Nine Lives You Have One Only
THINK!
March 16, 2020 at 5:31 am
Thank you very much! it's working now.
I am able to show my report for those stocked but not show within a date range.
Really very very grateful for your kind help.
March 17, 2020 at 12:10 pm
for these types of queries you might want to have a look up the GROUP BY ROLLUP command - it is not used too often, but it saves you using a union query
from the Microsoft site here is an example
MVDBA
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy