Re: Identity column in Table

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Farhan (Farhan_at_discussions.microsoft.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 11:35:06 -0800

Hello Allen,
Here is my proble, I have file atach you table, I am extracting the contents
to text file through data transfomration task (not sure if this is
necessary), now I have to import this file into table which has pk as
identity column and text doen't have value for this column but I am getting
error that can not insert null value in identity column.
Please help
Thanks

--
Farhan
"Allan Mitchell" wrote:
> Are you having trouble with this?
> 
> Problems With IDENTITY() and the DataPump task.
> (http://www.sqldts.com/default.aspx?293)
> 
> 
> 
> "Farhan" <Farhan@discussions.microsoft.com> wrote in message 
> news:Farhan@discussions.microsoft.com:
> > I am importing data in the table which has primary key as identity. Data
> > file
> > doesn't has the data for the column.
> > I created view which has the column except the identity column trying to
> >
> > import but getting error
> > Server: Msg 515, Level 16, State 2, Line 1
> > Cannot insert the value NULL into column 'ID', table 'MyTable; column does
> >
> > not allow nulls. INSERT fails.
> > Note: Bulk Insert through a view may result in base table default values
> >
> > being ignored for NULL columns in the data file.
> > The statement has been terminated.
> >
> > Please help.
> > Thanks
> > --
> > Farhan
> 
>