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 2012 Forums
 SSIS and Import/Export (2012)
 Expression to get the flatfile from the folder

Author  Topic 

Arunraj
Starting Member

18 Posts

Posted - 2015-01-27 : 09:27:37
Hi Friends,

I have files in my local folder
Like this
HIST_EYE0001_20150121_1406_SL.Txt
HIST_EYE0002_20150121_1406_SV.Txt
HIST_EYE0008_20150121_1406_INV.Txt
EYE0003_20150123_0800_SL.Txt
EYE0009_20150123_0800_SV_APPT.Txt

I need to pupolate these files into my local Database through SSIS package.
I have the Expression already to pull file with another name
but now the file name got changed the i have changed the name in Expressions also.
Then the data is loading wrongly in DB
Can any one please help me !

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-01-27 : 10:23:14
You'll have to provide a LOT more detail

1. the CREATE TABLE statement for the table your package is populating
2. the format (excel, csv, tag-delimited, etc) of the input flat files
3. a few lines of the input file(s) that work
4. a few lines of the input file(s) that don't work
5. Any error messages you receive from SSIS when running your package.
Go to Top of Page

viggneshwar
Yak Posting Veteran

86 Posts

Posted - 2015-01-28 : 07:34:57
File name you could recognize using for each loop and pass it to variable.

Regards
Viggneshwar A
Go to Top of Page
   

- Advertisement -