Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

I cannot get into my other profile: I like to ask for a idea of how to take three tables and use a join, or a type of join and If statement.

$
0
0

I have three tables. 

First table and Second table has a field(MnfrNum) that should be exactly the same in both tables, but this is not always true. 1st and 2nd table has a second field(ManufactureName) which should always be spelled out completely and exactly the same, but again, this is not always true and 1st table may have an abbreviated manufacture name or the second table may have an abbreviated manufacture name (but are still the exact same thing).  Both tables also have a distinctive number that correspond to each table respectively. 

Now the 3rd table is contains two columns with manufacture names that have been identified as exact crossed to both tables. 

I.e: Table 3rd

1sttableManufactureName                     2ndtablemanufactureName

Microsoft                                                 Xbox

Now these two are the same companies just different brands.

How can write a query where i can SELECT 1st.distinctiveNum, 2nd.distinctiveNum, 1st.ManufactureName, 2nd.ManufactureName, 1st.MnfrNum,2nd.Mnfrnum.

Where 1st.MnfrNum = 2nd.MnfrNum and 1st.manufactureName = 2nd.ManufactureName ( but if the manufactures are not exact , but appear in the 3rd table bring those back also)

Any help is very great full, thank you so much!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>