SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 flat file connection manager
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

moumona
Starting Member

2 Posts

Posted - 10/25/2013 :  09:21:52  Show Profile  Reply with Quote
I would like to set up the flat file connection manager that would take any file name that starts with "test" and then it could be anything after that. Something like test_*.txt. Can someone please advise how do I make this work?

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 10/25/2013 :  09:25:54  Show Profile  Reply with Quote
you need to set an expression for connection string property of flat file connection manager for that. In expression make first part statis ("test"). then add an expression based on your requirement to get rest of the part.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

moumona
Starting Member

2 Posts

Posted - 10/25/2013 :  09:36:01  Show Profile  Reply with Quote
Thanks Visakh16 for replying. I did do that. I put the filename path and the first static part in to a variable and referenced it in the Expression. But how do I use the second part? How do I concatenate that part?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 10/25/2013 :  22:44:41  Show Profile  Reply with Quote
whats the rule for that? if you specify that, I may suggest an expression.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

waterduck
Aged Yak Warrior

Malaysia
961 Posts

Posted - 10/27/2013 :  21:33:01  Show Profile  Reply with Quote
hi, you could utilize the "Foreach Loop Container" to loop all the file in the folder, later on you can use the "Expression Task" to check the file name same as your rule.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000