My Assistant
![]() ![]() |
|
|
Jan 6 2012, 11:06 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 127 |
Hello.
My file looks like this: H01052012 01052012 A A A000000099000000000000000179OSTK A A P000000193000000025000000418OSTK A A Z000000025000000023000000078OSTK I currently need to remove the header and then import the file into my database. The header contains the file date - which I would lke to have added as a field in my table with format YYYYMMDD. For example 'H01052012 ' would be 20120105. I also do not want that header to be in the database. Is there a way to do this ? This post has been edited by CarlM: Jan 6 2012, 11:07 AM |
|
|
|
Jan 6 2012, 11:13 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 8,167 From: Pacific NorthWet |
One-time or repeatedly?
One-time, just import it and delete the first record. |
|
|
|
Jan 6 2012, 02:19 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 127 |
Thanks. I import the file daily. If it matters, I am using Access 2003.
|
|
|
|
Jan 6 2012, 03:05 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 8,167 From: Pacific NorthWet |
Thanks for the clarification.
"... I import the file daily ..." ... from where? What data source? What data format? |
|
|
|
Jan 10 2012, 03:41 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 127 |
Thanks.
The file is imported from a location on my network. It is a csv file. MAybe I should clrify the steps I go through. I open a csv file. The data looks like this... H01052012 01052012 A A A000000099000000000000000179OSTK A A P000000193000000025000000418OSTK A A Z000000025000000023000000078OSTK I then manually remove the 1st row and save the file onto my network. I then use an Access import macro (defining field names and parsing the data) to import the file and append it to an existing table. I then manually use a query to add the date to these new records. What I am trying to accomplish is using Access to import the file (with the 1st row - H01052012 01052012), use characters 2 thru 9 in the 1st row of data (which is MMDDYYYY) for the value in all the new records 'date' field formatted YYYYMMDD. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 05:57 AM |