dbTalk Databases Forums  

Transformation to a Binary Field

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


Discuss Transformation to a Binary Field in the microsoft.public.sqlserver.dts forum.



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

Default Transformation to a Binary Field - 07-09-2003 , 09:05 AM






I'm running a load from DB2 to SQL Server using a DTS
Transformation. I have one field that's going to be the
same for every record so I want to just force it.
Normally I'd just do this: (for example)

Function Main()
DTSDestination("password") = "pwd"
Main = DTSTransformStat_OK
End Function

However the field in SQL Server is Binary.. so a normal
insert would be:

CONVERT(BINARY,'pwd')

How can I get this result in my transformation.. (Using
ActiveXScript) my first instinct was: (but that's mixing
T-SQL with Script.

Function Main()
DTSDestination("password") = CONVERT(BINARY,"pwd")
Main = DTSTransformStat_OK
End Function

Any Help? Thanks!!!

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.