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

Simple Column Update Using LOOKUP

$
0
0

I need to perform a very simple update of a column in a table. While it would be just as easy to write an EXECUTE SQL task, I'd like to do everything in SSIS little silos and avoid scripts where I can. I know what I need to do is use a LOOKUP and I think I'm 99% of the way there but now kind of stuck.

There are two tables - Table1 and Table2. Table1 has the lookup values I wish to use. Both tables have similar columns, but the two I'm interested in are CL_CODE and CHECK_ID. Table1 has both CL_CODE and CHECK_ID populated. Table2 only has CHECK_ID populated.

For every row in Table2 that has a matching row in Table1, I want to update Table2's CL_CODE with Table1's CL_CODE.

So I created an OLEDB Source which points to Table1, and I've selected the two columns in question.

I then created a LOOKUP task which points to Table2. I've "linked" the two tables via CHECK_ID and have checked the box next to CL_CODE. I've given CL_CODE an output alias of CL_CODE_OUT. For the Lookup Operation I chose "Replace CL_CODE".

Now is where I get stuck!!!

What's next??

Thanks!!


A. M. Robinson


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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