dbTalk Databases Forums  

Dynamically mapping columns

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


Discuss Dynamically mapping columns in the microsoft.public.sqlserver.dts forum.



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

Default Dynamically mapping columns - 09-02-2004 , 01:54 PM






Does anyone know if it is possible to programmatically map
columns (source to destination) in a dts package. I call
a stored procedure from vb that returns a sql select
statement. This statement is then set as a property of a
DTS package and the package is executed. I've been asked
to add the functionality of the sql statement changing.
Either adding or deleting colums from the select list.
The dts package still runs, but only on the old mappings.
It does not pick up any new fields that are added the the
sql statement.

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

Default Re: Dynamically mapping columns - 09-02-2004 , 02:13 PM






Dynamagically no DTS will not pick things up. Can you do it in code? Yes
you can. You will need to remove all the current transformation objects,
add your source columns to the SourceColumns property of the transform,
your destination columns to the DestinationColumns Property of the transform
and then add the transforms to the datapump.

Sound like hard work?

Ping me by eMail and I have a working example

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


<anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Does anyone know if it is possible to programmatically map
columns (source to destination) in a dts package. I call
a stored procedure from vb that returns a sql select
statement. This statement is then set as a property of a
DTS package and the package is executed. I've been asked
to add the functionality of the sql statement changing.
Either adding or deleting colums from the select list.
The dts package still runs, but only on the old mappings.
It does not pick up any new fields that are added the the
sql statement.



Reply With Quote
  #3  
Old   
Evelyn
 
Posts: n/a

Default Re: Dynamically mapping columns - 09-22-2004 , 05:50 PM



Hi Allan,

I'm trying to achieve the same thing as well (map columns dynamically).
I've done all the removing current transformation objects, add source
columns, add destination columns, etc. but still no luck. It seems like
the data pump task has a persistent memory of what the last set of
destination columns are. I'd really like to get your example on this.
How do I contact you (I'm not quite sure what you meant by ping you by
email)?

Evelyn

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

Reply With Quote
  #4  
Old   
Robert Pelletier
 
Posts: n/a

Default Re: Dynamically mapping columns - 09-23-2004 , 12:53 PM




I am also interested in seeing your methodology but I don't see your
e-mail address.

Thank you.


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

Reply With Quote
  #5  
Old   
Mark Evans
 
Posts: n/a

Default Re: Dynamically mapping columns - 09-28-2004 , 12:02 PM



Anyone find an answer yet? I need the same ASAP. If anyone has any
info please let me know.

Mark Mark.Evans (AT) Fairbankscapital (DOT) com

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

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

Default Re: Dynamically mapping columns - 09-28-2004 , 12:57 PM



An answer to what?

I have an example of dynamically mapping columns in a package which may or
may not meet your requirements. If you ping me I'll send you it.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Mark Evans" <signasl (AT) fairbankscapital (DOT) com> wrote

Quote:
Anyone find an answer yet? I need the same ASAP. If anyone has any
info please let me know.

Mark Mark.Evans (AT) Fairbankscapital (DOT) com

*** 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.