dbTalk Databases Forums  

How can I create a new GUID for Primary Key in DTS?

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


Discuss How can I create a new GUID for Primary Key in DTS? in the microsoft.public.sqlserver.dts forum.



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

Default How can I create a new GUID for Primary Key in DTS? - 10-20-2004 , 05:49 AM






I am using DTS to transfer data from 2 tables

However on the destination table the primary key is a uniqueidentifier
which is NOT created automatically. I need to create this in the
transformation somehow.

Is there any way of doing this other than writing a COM object?

Cheers for any help,
DJ.

Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: How can I create a new GUID for Primary Key in DTS? - 10-20-2004 , 07:58 AM






Function CreateGUID()
Dim TypeLib

TypeLib = CreateObject("Scriptlet.Typelib").GUID
CreateGUID = Mid(TypeLib, 1, Len(TypeLib) - 2)
End Function

"DJ" <superdj (AT) hotmail (DOT) com> wrote

Quote:
I am using DTS to transfer data from 2 tables

However on the destination table the primary key is a uniqueidentifier
which is NOT created automatically. I need to create this in the
transformation somehow.

Is there any way of doing this other than writing a COM object?

Cheers for any help,
DJ.



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.