Porting Data

  • Hi All,

    I have an OLEDB Data Source that has 3 columns. I want to map these 3 columns to another table in another database. The new table has 4 columns. 3 map directly to the source, but I have a 4th column which is of type int and is my primary key on the destrination data.

    So I Have:

    Source                Destination

    Column1              column2

    column2              column3

    column3              column4

     

    as my mapping. Column1 I want to auto increment (only for the purposes of this task) How do I force column1 to auto increment.

    Both Databases are SQLServer 2005 

  • create your column 1 in the destination table with identity specification (is identity) set to yes. You can use the import wizard in the BI Studio to port your data.


    Everything you can imagine is real.

  • Great Thanks, that worked a treat. On a similar deal, what if I didn't want to have an identity field, but instead I wanted to hard code a value.

    So 3 columns mapped 1:1 but my 4th field in the destination happened to be a varchar(1) and I wanted to set this to 'C'.  This is because I'm going to be merging 2 tables into 1 and this is my flag to give me the difference.

  • you can customise your transform and put the changes in your script or instead of importing direct from the table you can write a query in which you do the funky stuff you want.

    i would think the query method is the easiest to implement


    Everything you can imagine is real.

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

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