dbTalk Databases Forums  

Excell and Autoincrement id-fields

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


Discuss Excell and Autoincrement id-fields in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danny Neleman | Eye2i
 
Posts: n/a

Default Excell and Autoincrement id-fields - 06-10-2004 , 04:41 AM






Dear all

I'm trying to in import a excell-table to my MSSQL-database. Problem is that I have a auto increment field of record id. If I import the table I tried to <ignore> the ID-field but with the conversion it won't use auto increment. Now the wizard reports that BLABLA_ID can't be NULL, cause i'm ignoring it

How can I use auto increment on Excell Import? some VBS code for it . I'm a dummy on DTS and VBS

Current generated code from the wizard

Function Main(
<here I need a function on OMZET_ID to auto increment
DTSDestination("OMZET_FILIAAL_ID") = DTSSource("F1"
DTSDestination("OMZET_JAAR") = DTSSource("2004"
DTSDestination("OMZET_WEEKNR") = DTSSource("F4"
DTSDestination("OMZET_OMZET") = DTSSource("F1"
DTSDestination("OMZET_OMSCHR") = DTSSource("F5"
Main = DTSTransformStat_O
End Functio

Thanks in advance

Dan Neleman

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

Default Re: Excell and Autoincrement id-fields - 06-10-2004 , 07:10 AM






Does this article give you any pointers?

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


"Danny Neleman | Eye2i" <d.neleman (AT) eye2id (DOT) nl> wrote

Quote:
Dear all,

I'm trying to in import a excell-table to my MSSQL-database. Problem is
that I have a auto increment field of record id. If I import the table I
tried to <ignore> the ID-field but with the conversion it won't use auto
increment. Now the wizard reports that BLABLA_ID can't be NULL, cause i'm
ignoring it.
Quote:
How can I use auto increment on Excell Import? some VBS code for it . I'm
a dummy on DTS and VBS.

Current generated code from the wizard:

Function Main()
here I need a function on OMZET_ID to auto increment
DTSDestination("OMZET_FILIAAL_ID") = DTSSource("F1")
DTSDestination("OMZET_JAAR") = DTSSource("2004")
DTSDestination("OMZET_WEEKNR") = DTSSource("F4")
DTSDestination("OMZET_OMZET") = DTSSource("F1")
DTSDestination("OMZET_OMSCHR") = DTSSource("F5")
Main = DTSTransformStat_OK
End Function

Thanks in advance.

Dan Neleman



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.