Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Variables

Author  Topic 

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2010-06-30 : 05:10:33
I wonder if any one can help. I am a rusty newbie to SSIS. I am trying to bring over a flat file typical Name (sp_feed_3006010.txt) I have created my variable (@[User::SalesPointData] + "\\sp_feed_"
+ RIGHT("0" + (DT_STR, 2, 1252) DAY( GETDATE() ), 2) + RIGHT("0" + (DT_STR, 2, 1252) MONTH( GETDATE() ), 2) + (DT_STR, 4, 1252) YEAR( GETDATE() ) +".txt")
I have evaluted this and it comes back OK to how I want to see it. My issue is changing my file name to read (sp_feed_<variable>.txt)

Whitmoj
If I have inspired one person today then my job is done.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-30 : 05:30:56
I think what you need is to add an expression at the filename property.
But maybe I misunderstood your problem.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2010-06-30 : 05:40:08
I think you have read it correct my filename changes with the current day. Any ideas how I would start with the expression. Even if its a link to a web page this would be great.

Whitmoj
If I have inspired one person today then my job is done.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-30 : 06:01:22
Right click the Connection Manager to your output file and choose Properties.
In the Properties window click Expressions and then click the little appearing [...] button.
In the pop up Property Expression Editor click the Property column and choose "ConnectionString" and then in the right column named "Expression" you can build your expression to have a variable file name...

Hope this helps.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2010-06-30 : 06:10:30
Cheers

Whitmoj
If I have inspired one person today then my job is done.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-30 : 06:47:12
welcome


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -