dbTalk Databases Forums  

Identity column in Table

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Identity column in Table in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Farhan
 
Posts: n/a

Default Identity column in Table - 02-03-2005 , 02:03 PM






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


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Identity column in Table - 02-03-2005 , 02:22 PM






Are you having trouble with this?

Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)



"Farhan" <Farhan (AT) discussions (DOT) microsoft.com> wrote

Quote:
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


Reply With Quote
  #3  
Old   
Farhan
 
Posts: n/a

Default Re: Identity column in Table - 02-07-2005 , 01:35 PM



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:

Quote:
Are you having trouble with this?

Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)



"Farhan" <Farhan (AT) discussions (DOT) microsoft.com> wrote in message
news:Farhan (AT) discussions (DOT) 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.