dbTalk Databases Forums  

Re: Identity key

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


Discuss Re: Identity key in the microsoft.public.sqlserver.dts forum.



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

Default Re: Identity key - 05-13-2004 , 10:49 AM






Have a look at this article and it should help

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


"nmerydem" <n.merrydemontigny (AT) eu (DOT) joneslanglasalle.com> wrote

Quote:
I'va got a view, and i select certain column of it to insert in an other
table. The problem is that the table in witch i insert the data has got an
Identity primary key, and then, the DTS bring me back an error " integraty
violation..etc..can not insert null.."
Quote:
In fact, what i want the dts to do, is to fill automaticaly the identity
column (as usualy when you insert a row..)

ps: i've unchecked the Enable identity insert.

i'm sure you know the problem and i wish you could help me.

thanks





Reply With Quote
  #2  
Old   
nicolas merry
 
Posts: n/a

Default Re: Identity key - 05-13-2004 , 11:18 AM







tahnk you, but I have already have a look at this article. But, i don't
want to bring back an identity column from an other database, i want to
import data in the table and to automaticaly fill the identity column
for exemple, i bring tree column, foreName, Surname, adress, and in the
new table, i've got 4 column : ID, forename, surname and adress. The ID
column is a primary key set as identity

i'll have a activeX code like that :

Function Main()
DTSDestination("forename") = DTSSource("forename")
DTSDestination("surName") = DTSSource("surname")
DTSDestination("adress") = DTSSource("adress")
Main = DTSTransformStat_OK
End Function

but that doesn't work. The DTS want to insert a value Null or other in
the Identity column.

Please help... thanks



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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

Default Re: Identity key - 05-13-2004 , 11:49 AM



OK

So you want to populate ALL attributes in the destination EXCEPT the
IDENTITY attribute and you want the IDENTITY attribute to autopopulate as
before

This is covered in the article

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

I have just done it.

--
--

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


"nicolas merry" <n.merrydemontigny (AT) eu (DOT) joneslanglasalle.com> wrote

Quote:
tahnk you, but I have already have a look at this article. But, i don't
want to bring back an identity column from an other database, i want to
import data in the table and to automaticaly fill the identity column
for exemple, i bring tree column, foreName, Surname, adress, and in the
new table, i've got 4 column : ID, forename, surname and adress. The ID
column is a primary key set as identity

i'll have a activeX code like that :

Function Main()
DTSDestination("forename") = DTSSource("forename")
DTSDestination("surName") = DTSSource("surname")
DTSDestination("adress") = DTSSource("adress")
Main = DTSTransformStat_OK
End Function

but that doesn't work. The DTS want to insert a value Null or other in
the Identity column.

Please help... thanks



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #4  
Old   
Partha Mandayam
 
Posts: n/a

Default Re: Identity key - 05-13-2004 , 11:58 AM



In the transformation properties choose "ignore" for the identity column

Regards

Partha Mandayam
Software Consultant
Home page: http://partha.tripod.com


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #5  
Old   
nicolas merry
 
Posts: n/a

Default Re: Identity key - 05-14-2004 , 03:53 AM





thank you very much, i'va finally find out what was wrong : The Identity
column was selected as a destination column....
All is OK now.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.