dbTalk Databases Forums  

pass FIELD dynamically to title of text file in DTS

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


Discuss pass FIELD dynamically to title of text file in DTS in the microsoft.public.sqlserver.dts forum.



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

Default pass FIELD dynamically to title of text file in DTS - 05-17-2006 , 11:18 AM






Hi!

I have a DTS package that exports a table to text.

I need to find a way to look into the table and get the carrier ID and
insert it into the title of the text file to be exported to.

the title should look like this:

E55N6050.log

where 55 is the carrier id

N is the region

6 is the last digit year

05 is mm

0 is the sequence.


How would you do this?

Thank you in advanced.

TG


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

Default Re: pass FIELD dynamically to title of text file in DTS - 05-17-2006 , 06:22 PM






Hello TG,


OK So long as you can get those values from the table and map them to Global
Variables then we can still do this.

You need to dynamically change the file name

How can I change the filename for a text file connection?
(http://www.sqldts.com/default.aspx?200)


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi!

I have a DTS package that exports a table to text.

I need to find a way to look into the table and get the carrier ID and
insert it into the title of the text file to be exported to.

the title should look like this:

E55N6050.log

where 55 is the carrier id

N is the region

6 is the last digit year

05 is mm

0 is the sequence.

How would you do this?

Thank you in advanced.

TG




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

Default Re: pass FIELD dynamically to title of text file in DTS - 05-18-2006 , 01:30 PM



Hi Allan!

I saw that, but somehow it goes not show me how to retrieve the field
from the table.

I am not a programmer so I have no idea how to do that.

Maybe you can put a example.

Thank you!

Tammy


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

Default Re: pass FIELD dynamically to title of text file in DTS - 05-18-2006 , 06:15 PM



Hello TG,

So you are going to have to read the values from the table into a variable
or two so have a look through this article.

http://www.sqldts.com/default.aspx?277,8

The type of statement you want is a SELECT statement

You will also be configuring the Output Parameters on this page.


Let us know how you get on?

Is there no-one where you work that can help?

I cannot tell you what the SELECT statement will be because I cannot see
your table design with sample data


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi Allan!

I saw that, but somehow it goes not show me how to retrieve the field
from the table.

I am not a programmer so I have no idea how to do that.

Maybe you can put a example.

Thank you!

Tammy




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.