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.
Author |
Topic |
AustraliaDBA
Starting Member
38 Posts |
Posted - 2012-05-09 : 01:38:52
|
Hi All SSIS Gurusi need help. i have a ssis package which loop through the excel files and import the data into sql table. it is working fine with reading multiple files in a folder. issue is file names has date time stamp means file name changes everyday and i couldn't figure out how to accomodate new file names into my package. read few articles and they talk about using script task. could anyone please give me details instruction about the script because i have no idea from where i should start writing the script. please help...Thanks Thanks |
|
AustraliaDBA
Starting Member
38 Posts |
Posted - 2012-05-09 : 18:15:49
|
anyone any idea please adviceThanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-09 : 22:33:24
|
sorry didnt understand whats the difficulty you're facing. Are you trying to identify files that belong to a particular day? If yes, you can use Instr() function inside script task to check for current date patter within filename. just need to compare filename variable against a variable containing value of now() function which gives current datetime value. Also make sure you do proper formatting of date to get in same format as in filename before the comparison using Instr()------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
AustraliaDBA
Starting Member
38 Posts |
Posted - 2012-05-10 : 00:02:41
|
thanks for your reply. after struggling for a day and half i figured out how to write the script in C# for script task to extract the names of files based and pass the name to dataflow task....Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-10 : 00:13:36
|
quote: Originally posted by AustraliaDBA thanks for your reply. after struggling for a day and half i figured out how to write the script in C# for script task to extract the names of files based and pass the name to dataflow task....Thanks
ok...you can use vb.net also if you've proficiency in that------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|