Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Help with join to include all regions

Author  Topic 

MGrassman
Starting Member

4 Posts

Posted - 2009-12-21 : 14:42:35
I have the following view which contains this data

ActivityRecId RegionRecId IsExcluded
1 null 1
2 null 1
3 1 1
3 2 1
4 1 1
5 null 0


What I would like to do is join the region table to the view above to get the following records.
1 null 1
2 null 1
3 1 1
3 2 1
3 3 0
3 4 0
4 1 1
4 2 0
4 3 0
4 4 0
5 null 0

Any suggestions. Let me know if you need any other information.

Thanks,

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-21 : 15:10:31
OK..but you also need to show the table structure and sample data from the region table ...and how it is related to this view.
Go to Top of Page
   

- Advertisement -