Zolf
asked on
Compare two tables for common string
Hello there,
I want to do this in SSIS. My situation is as follows. I have Supplier table and a table which has the supplier/product name and other details about the products. Both the table have a common column called SupplierName. Now I want to compare these two columns and if they are same then insert the ID from the Supplier Table into this second table where all are in one table. I tried with SSIS see shot,but I get error
2-15-2014-11-00-18-AM.gif
I want to do this in SSIS. My situation is as follows. I have Supplier table and a table which has the supplier/product name and other details about the products. Both the table have a common column called SupplierName. Now I want to compare these two columns and if they are same then insert the ID from the Supplier Table into this second table where all are in one table. I tried with SSIS see shot,but I get error
2-15-2014-11-00-18-AM.gif
ASKER
by: Surendra Ganti
thanks for your comments. can you please explain what does the first line say ;WITH C AS
thanks for your comments. can you please explain what does the first line say ;WITH C AS
that is called as common table expression (CTE)... this is newly introduced in SQL Server 2005
ASKER
thanks for your comments. any idea why I get that error in my SSIS.I want to know the reason as to what I am doing wrong
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the second table that you are talking about is TableA.
The common column here is ColumnX.
There are many ways to solve this issue, what I would do is to add a SQL task in the control flow and execute the below sql statement which will simplify the things
Open in new window