Updating table in SSIS

  • I have a table with some records. I then added a new column with the default value as NULL. As a result, all the existing values in the table will be populated with NULL for all the records present. When the new data is loaded, the new column added gets the respective values form DB.

    Now, I want to update this table for all the NULL values in the new column with the respective values present in DB. I have stored appropriate values for the NULL values in a variable. Also the values should be updated only when Cont No. (a column name) is numeric. How can I go about it to update the table for the existing records?

    Any suggestions please.

  • i'm not quite sure i followed your question completely, but my iterpretation of your issue is that you've created a NULL column you want to fill with data later in the ssis stream. i'm not sure why you had to load a variable with data, so that is my disconnect and this is where i will probably over simplify - sorry!

    if you've loded your data minus your null column, if you weren't using ssi could you write a sql statement to update your data? if so, could you try an execute sql transform to update said data?

    it seems to me i may have missed part of your conundrum and have over-simplified, if so i apologize for not helping you address your issue

  • I just want to update my table for the records having NULL value in the newly inserted columns. any way is ok as long as the table is getting updated for the NULL records.

    The entire flow is in the data flow task with a source, few transformations in the middle and then loading or updation to the target table.

    Any suggestions to update the table.

    Thanks

  • if at this point you could write an sql statement to update your records in an sql tool outside of ssis (ssms?), then i would try to use an ssis execute sql tool (transform?) and insert the sql you would have used outside ssis into the sql statement box.

    still not sure if i'm over simplifying, if so sorry. i'm going to bed so i will check back in the morning. good luck!

  • use SQL task and use update statement to update your table inside SSIS package.

    hope this will work..

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply