• hasysf (7/18/2008)


    hello everyone

    here is the scenario. I have a table in the oracle database and i am transfering its data to the sql server 2005. My destination table has all the null columns except the primary key. Now i am using column mapping to import the data from oracle to sql in the columns other than primary key but it gives me error that u can not insert null in the primary key column when in fact its already has data. So please guide me how to insert or what ever i should do to get the data in the desired columns

    thanks

    I read the previous post and I don't think you got the answer you wanted - apologies to you both if I'm wrong.

    I think you have an empty sql server table and want to populate it with all the columns from the Oracle table. You have mapped everything except the primary key.

    I am guessing you want the primary key to generate its own unique value (like an Access autonumber data type). If this is the case, you need to change the design of the table in SQL Server.

    If you modify the table design and look at the column properties for the primary key column you will see values under the heading Table Designer.

    There is one called Identity Specification and you should set this to 'Yes'. (If you are letting your primary key populate itself I am assuming it is an int or bigint, or similar). Under this property are the sub properties Identity Increment and Identity Seed. They default to 1 and the latter means start at 1 while the former means increment by 1. You can change these at will.

    If I have read you right and you do this, your package should run fine