dbTalk Databases Forums  

Setting a column's value in Transformation in a DTS

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


Discuss Setting a column's value in Transformation in a DTS in the microsoft.public.sqlserver.dts forum.



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

Default Setting a column's value in Transformation in a DTS - 05-05-2004 , 11:05 AM






Hi all,

I have a DTS which has a text file (source) which transform data to a table
'IMPORT' in my database. It is a very simple operation: the text file has
only one field and it goes in one column 'import_record' of the table. Now
this table has another column 'import_type' for which i want to set a value
in the DTS. This value can be a result of an SQL statement or it can be just
a hard-coded number like 1. How can I do it? Please help

Thanks

JY



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

Default Re: Setting a column's value in Transformation in a DTS - 05-05-2004 , 02:52 PM






I presume when you say "This table" that you mean the destination.

In an ActiveX transform have a Global Variable map to the destination
attribute i.e.

DTSDestination("ExtraCol") = DTSGlobalVariables("MyVar").Value

You can then assign your static value or result from a Query to the Global
Variable

--
--

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


"J Y" <jy1970us (AT) hotmail (DOT) com> wrote

Quote:
Hi all,

I have a DTS which has a text file (source) which transform data to a
table
'IMPORT' in my database. It is a very simple operation: the text file has
only one field and it goes in one column 'import_record' of the table. Now
this table has another column 'import_type' for which i want to set a
value
in the DTS. This value can be a result of an SQL statement or it can be
just
a hard-coded number like 1. How can I do it? Please help

Thanks

JY





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.