May 27, 2009 at 4:24 pm
In sql server 2008 (sp1) - Excel 2003 (sp3)
I am trying to move data from an excel spreadsheet to a table in sql.
I have used the import export wizard to create an SSIS package.
When I run the package I get :
"Cannot insert the value NULL into column 'DisciplineMappingID', table 'ECARS.dbo.DISCIPLINE_MAPPING'; column does not allow nulls. INSERT fails.".
(SQL Server Import and Export Wizard)
The column 'DisciplineMappingID', is the primary key of the table, but it is not an identity column. It is not nullable. Has a type of “int”.
This table was created by an outside consultation firm as a part of a new system, and I have to accept the table as it was designed, I cannot change it.
-----------------------------------------------------------------------
Also,
There is one column in the excel spreadsheet that has a column, that
Needs to be split into two different fields in the table on sql.
Not sure how I can use the import export wizard to do this.
Thanks in Advance…
May 27, 2009 at 4:30 pm
Can you copy all the data into a staging table first, and then run whatever validations you need to against that data before moving it into the 'real' table?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply