Updating all columns in Tbale using OLEDB

Answered Updating all columns in Tbale using OLEDB

  • Monday, January 28, 2013 12:52 PM
     
     

    Hi,

    I have one table with 10 columns, i want update all columns,(i mean i u don't know particular column)

    which column it may come update u don't know then i want update those columns

    using oledb command

    how i have to write a query

    Regards

    Arjun


    mallis

All Replies

  • Monday, January 28, 2013 12:59 PM
     
     
    Can you give an example with sample data, because your requirement isn't entirely clear.

    MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

  • Monday, January 28, 2013 1:02 PM
     
     

    HI Koen,

    I have 1 table Emp, in this i ahve 5 columns, it is my source data

    next day comes with updated data (we don't know which column was updated)

    so i need to have update destination data

    Thanks

    Regards

    Arjun


    mallis

  • Monday, January 28, 2013 1:03 PM
     
     
    Then just write an update statement that updates all columns.

    MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

  • Monday, January 28, 2013 2:34 PM
     
     Answered

    Actually, new coming data may be from some file, table etc. In that case you would need to use look transformation and ole db commmand. If records are new, insert  them into destionation table, and if records are existing, update the destination table.

    Following link is helpful on this:

    http://www.simple-talk.com/sql/ssis/implementing-lookup-logic-in-sql-server-integration-services/

    Thanks,


    hsbal