data question

  • in my dts package, I need to get information in one table on a database and move it to another table on a different database depending on the id.

    ex.

    I have an id in table1 of database1

    I need to get the email and address from table 3 in database 2 dependant on the id being equal to that of table1 in database1

    can I get help on this?

    Never tried this type of manipulation before

  • This is a great site for sql dts help.

    http://www.sqldts.com

    Your going to want to look at lookups

    http://www.sqldts.com/default.aspx?277

    Or I usually elect for a simple solution. involving a few separate steps.

    Create a table on db 2 and dts all id's you want over to it.

    Then using code and id's send data over on db 2 write a query to select data you want and ship over to db 1.

    Clean up the table and your done.

    either way will work.

  • just create a stored proc that does the job and include it in your dts package.

    create proc cp_transferData

    as

    insert into database1..table10

    select a.email,a.address

    from database1..table1 a inner join

    database2..table3 b on a.id = b.id

    you can put whatever other condition in a where statement


    Everything you can imagine is real.

Viewing 3 posts - 1 through 2 (of 2 total)

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