Importing error

  • Hi all,

    I have csv file which has 2 columns & 4 records are as follows

    EmpNo EmpName

    1 a

    2 b

    3 c

    1 a

    I created new table called T4, structure of T4 is

    EmpNo Varchar(50) with Primary Key

    EmpName Varchar(50) disabled Allow Nulls

    Now I started importing csv data to T4 table, during importing it couldn't finish entire process. Throwing error, when I remove primary key with disable Allow Nulls for both constraints of a table T4. Importing data successfull.

    My question is if I have above said structure for the table T4 (with primary Key), during importing instead of throwing error let it be import first 3 rows then throw error as primary key enabled could not able to import. Is this can be possibe, if so please suggest me to solve the problem.

    Thanks in advance

    Karna

  • How are you importing the data? Many methods allow you to not fail on 1 error. Or you can import into a staging table and then clean the data.

    PKs exist for a reason. They need to be enforced and you need to clean this data before it goes into the table.

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

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