Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    7

    Question Unanswered: sql server 2000, dts and identity col

    Hello,
    I am importing a text file into a table that has an identiry col (used as primary key).
    The text file does NOT contain the value for the identity col - I have 'enable identity insert' off (unchecked).

    I would like sql server to auto generate the value as it inserts the rows (of course I would - after all it is an identity col).

    Unfortunately, when I run the import it immediately complains about a null value for the identity col - I thought that unchecking 'enable identity insert' would be enough.

    I have a few data transformations and none of those mention the identity col.

    Any ideas ?
    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    7
    I added another transformation routine that simply set my identity col = 0 - and it worked - I don't know why but it worked.

    Has anyone run into this problem before - if so, is there a more rational way to get sql server to assign the identity col a value?

    Thanks!

  3. #3
    Join Date
    Nov 2003
    Location
    Russia
    Posts
    3

    Arrow

    Originally posted by gtr111
    I added another transformation routine that simply set my identity col = 0 - and it worked - I don't know why but it worked.

    Has anyone run into this problem before - if so, is there a more rational way to get sql server to assign the identity col a value?

    Thanks!
    Create target table without IDENTITY - only INT
    For example,
    OLD -
    CREATE TABLE [D_Color] (
    [id_color] [int] IDENTITY (1, 1) NOT NULL ,
    .......

    New --->

    CREATE TABLE [D_Color] (
    [id_color] [int] NOT NULL ,
    ..........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •