Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2007-05-25 : 05:34:18
|
| Hi all,I have csv file which has 2 columns & 4 records are as followsEmpNo EmpName1 a2 b3 c1 aI created new table called T4, structure of T4 isEmpNo Varchar(50) with Primary KeyEmpName Varchar(50) disabled Allow NullsNow I started importing csv data to T4 table, during importing it couldn'tfinish entire process. Throwing error, when I remove primary key withdisable Allow Nulls for both constraints of a table T4. Importing datasuccessfull.My question is if I have above said structure for the table T4 (withprimary Key), during importing instead of throwing error let it be importfirst 3 rows then throw error as primary key enabled could not able toimport. Is this can be possibe, if so please suggest me to solve theproblem.Thanks in advancePMS |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-05-25 : 05:58:48
|
| Just to clarify, are you using DTS or SSIS?Mark |
 |
|
|
putane.sanjay
Yak Posting Veteran
77 Posts |
Posted - 2007-05-25 : 06:06:38
|
| using dts |
 |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2007-05-25 : 07:00:12
|
| With DTS, I'd always advise performing an initial insert into a staging table (without constraints), then testing for duplicates, data type issues, etc. before performing the final insert.Mark |
 |
|
|
|
|
|