473,408 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

how to import a delimited text file like this?

5
it is very large file, has 678000 rows.
but the txt file get is like that

"name","address","zip","state"
="11",="aaa",="00001",="NY"
="22",="bbb",="00002",="CT"
="33",="ccc",="00003",="NJ"
="44",="ddd",="00001",="MA"


there is = signs and when i import in Access, it returns error"Unparsable Record"
i tried to use notepad to replace all "=" sign into "", but the file is so large, notepad cannot handle. since it is a on going event, is there any way i can import to access directly?

thanks
Apr 3 '07 #1
3 2048
Seanw
5
bump......
Apr 4 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
it is very large file, has 678000 rows.
but the txt file get is like that

"name","address","zip","state"
="11",="aaa",="00001",="NY"
="22",="bbb",="00002",="CT"
="33",="ccc",="00003",="NJ"
="44",="ddd",="00001",="MA"


there is = signs and when i import in Access, it returns error"Unparsable Record"
i tried to use notepad to replace all "=" sign into "", but the file is so large, notepad cannot handle. since it is a on going event, is there any way i can import to access directly?

thanks
Hi Sean

I would import the file as it is with comma as the separating value. Turn off the " as the text identifier. This will import the records with the = signs and the " quotes but it should be a lot easier to do the find and replace in Access.

Only other option is to read the file in line by line using VBA and ignoring all = signs. It's not a straightforward code but the following tutorial should give you some idea what's involved.

Import csv (Comma Separated Value) File

Mary
Apr 4 '07 #3
Seanw
5
Hi Sean

I would import the file as it is with comma as the separating value. Turn off the " as the text identifier. This will import the records with the = signs and the " quotes but it should be a lot easier to do the find and replace in Access.

Only other option is to read the file in line by line using VBA and ignoring all = signs. It's not a straightforward code but the following tutorial should give you some idea what's involved.

Import csv (Comma Separated Value) File

Mary
Thanks a lot Mary, yes i tried first one, but since it is a such large file, it take at least 30 minutes to run replace, and my access can only run around 60000 replace each time. it ask me to modify registry, but it is locked.

Use VBA is good idea, but i am not that familiar with it. Anyway, thank you for your reply.
Apr 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: atse | last post by:
Hi, I still have problem to import the text file delimited by tabs or commas into the database. I refer to http://www.connectionstrings.com/ for the connection, ODBC doesn't work and OLD DB...
0
by: atse | last post by:
Hi, I am still stick on the text file being imported to database. Can anybody help? I have just done the csv format files. And then I work on text and DAT formats, but I have problem to import...
1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
1
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time...
1
by: praz | last post by:
Hi, I am trying to import a delimited text file using a macro. The problem is i am not able to generate a Primary key (Let access add primary key). I have tried saving the import specs using the...
1
by: Ruslan Shlain | last post by:
I have a | (pipe) delimited file that i need to import in to a Dataset. With code below i get 7 items in the first column of each row and the rest is empty. PLEASE HELP Below if the code that...
3
by: Davy B | last post by:
I am trying to import a data file, which is tab delimited, using BULK INSERT. I have used BCP to create a format file, since the destination table has around 20 columns, but the data file has only...
0
by: Shawn Ferguson | last post by:
With the help of you, I've been able to successfully load my database with the contents of a "comma" delimited file. It loads about 5000 records in about 3 seconds:) Now I have another problem. ...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
5
Eonasdan
by: Eonasdan | last post by:
Greetings! I hope some can help with out with this. I am trying to write a scripting using bcp to import large amounts of data from a text file that is tab delimited. The problems I have run into is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.