Re: Using DTS to automatically increment the primary key of the table
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 06/14/04
- Next message: Rand Boyd [MSFT]: "RE: DTS Run"
- Previous message: Joel: "DTS Run"
- In reply to: Claire: "Using DTS to automatically increment the primary key of the table"
- Next in thread: Claire: "Re: Using DTS to automatically increment the primary key of the ta"
- Reply: Claire: "Re: Using DTS to automatically increment the primary key of the ta"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Jun 2004 13:42:35 +0100
Have a look at this article: It will help you get around some of the issues
you may encounter.
Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)
-- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Claire" <Claire@discussions.microsoft.com> wrote in message news:62B77064-0B31-421B-AA04-5B7510D031C1@microsoft.com... > I am totally new to SQL Server so apologies if this seems a silly question. I am trying to schedule a daily import from a csv file into an application that runs on SQL server. I can create a DTS package to do this but the main problem is the primary key of the table is a surrogate key that automatically increments. I cannot import a csv file without supplying a memberID(primary key). I can supply a memberID in the base csv file if I know the next number but this is not always possible as multiple sources can insert a new row into the table. If I use SQL to insert a new row into the SQL Server db (by using SQL Query Analyzer) the database will automatically increment a memberID and the value does not need to be supplied. DTS seems to be the easiest way to schedule a daily import but I cannot seem to get around the auto incrementing primary key issue. All feedback is welcome & sorry for being the annoying novice!
- Next message: Rand Boyd [MSFT]: "RE: DTS Run"
- Previous message: Joel: "DTS Run"
- In reply to: Claire: "Using DTS to automatically increment the primary key of the table"
- Next in thread: Claire: "Re: Using DTS to automatically increment the primary key of the ta"
- Reply: Claire: "Re: Using DTS to automatically increment the primary key of the ta"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|