Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Import from multiple flat files daily with filename and date


Import from multiple flat files daily with filename and date

Author
Message
aharish_iitk
aharish_iitk
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 15
Dear All,

I am a new comer to SQL Server and have no programming background. I am trying to make a database for my own small company.

I get some 100 flat files everyday. All of them have same data format. I am attaching a zip of one day. I get one such zip file daily.

The file name format is like I_location code_date.

My requirement is that data from all these 100 files should be imported in a table into SQL Server 2005. Apart from the data from the files two new columns should be added for location code and date.

I am trying to do this since last 10 days and I have put lot of efforts but could not do it. I have been successful in importing the data and the full file name. But I have not been able to capture date and location code. All this info is available in the file name. Also I want to do it in a single package but multiple flat file connector seems not to be working for me.

I will be sincerely thankful for any help and solution in this regard.

Harish Awasthi
Attachments
DL290608I.zip (3 views, 2.00 MB)
aharish_iitk
aharish_iitk
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 15
I have been able to run ForEach loop for this problem. All the files loaded in a single run. It was amazing to see that.

Now please help me with the location code and date extraction from the file name.

Thanks in advance.

Harish
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search