Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV dump

Status
Not open for further replies.

Cillies

Technical User
Feb 7, 2003
112
GB
Hi! I wish to create a csv dump but am finding it increasingly difficult to find any information about csv and how it operates.

So I was hoping that maybe there is someone out there who knows of a website that gives a description and case study of what a csv dump is all about, not to mention how it works.

If anyone can help it would be greatly appreciated

regards
Cillies
 
Chillies,


The following comes from -

In computers, a CSV (comma-separated values) file contains the values in a table as a series of ASCII text lines organized so that each column value is separated by a comma from the next column's value and each row starts a new line. Here's an example:
Doe,John,944-7077
Johnson,Mary,370-3920
Smith,Abigail,299-3958
(etc.)

A CSV file is a way to collect the data from any table so that it can be conveyed as input to another table-oriented application such as a relational database application. Microsoft Excel, a leading spreadsheet or relational database application, can read CSV files. A CSV file is sometimes referred to as a flat file.


I am not certain about case studies on CSV but this file format is one of the oldest one available and everything from a mainframe to a PDA can understand how to work with and convert data into this format for the reasons that were stated above.

Hope this helps,


Steve
 
Thanks Steve,

You see the thing is, I have to design a web site with a CSV dump and my own database.

Now, I will be getting large quantities of information sent to me and I'm not so sure of how to incoroprate a csv dump to recieve such information, or am I just fretting over nothing.

Regards
Cillies
 
Cillies,

You should be just fine. Most database application have the ability to import a CSV dump and convert it into a table format that the database can use.

See if you can track down the documentation on the database application and find out what type of data conversion it will allow the CSV should be in that list.

A few other items to be sure of -

The CSV dump will be consistant.
By this I mean once the order of the data has be established it will not be changed. This is critical because if you are querying the data and it changes from "John","Doe" to "Doe", "John" your output will be in correct.

If the data has to be parsed
Meaning that you now have "John Doe" and need to split the value into a first name and last name.


Again, I hope this helps,


Steve
 
Cheers steve,

that has ironed out some of my concerns.
Hope you have a happy new year.

Kindest regards

Cillies
 
Another thing to be careful of with a CSV file is to make SURE that the 'embedded data string' does not itself contain any commas - this will throw off the input reader. For example, if you have a file and are describe it as Last Name-comma-First Name-Comma-Account Number and you have a piece of data that comes in like "Smith, Jr, John, 123455676", the reader will see the comma between SMITH and JR, setting JR in to the FIRST NAME buffer in the receiving file, and setting JOHN in to the account number field, which will, at best, cause a data mismatch error.

Embedded commas are fairly common in fields like LAST NAME or ADDRESS, if there is not a fairly strict data validation process in effect in the original data input process. After all, it's hard to make sure that something that's perfect valid like "22 East Maple, #44" doesn't sneak in, or the aforementioned "Smith, Jr" or "King, VIII, Henry" kind of stuff.

If your data stream MIGHT contain commas embedded in it, it might be better to set up a column-delimited input process, where you specify the start and end columns specifically for data, and embedded commas won't matter.

Just a W2TW...

Jim

Don't be sexist - Broads hate that.
Another free Access forum:
More Access help stuff at
 
Actually, the quotation marks around

"Smith, John","..."

are there precisely to make sure the reader does not get confused with embedded commas: one can see that the comma between Smith and John is part of the data.

If you are not sure that a CSV file is well formed, try reading it with Microsoft Excel or any other number of tools.

Dimandja
 
Dimandja - you are precisely correct, but what you describe is NOT a CSV file, but a text-delimited file. Not all CSV output processes ALSO surround their text with quotes.

I've had to deal with importing and exporting data files from various types of computers since 1981, and this can be a real pain in the tuchis if you aren't prepared for oddball data....

Jim



Don't be sexist - Broads hate that.
Another free Access forum:
More Access help stuff at
 
Thanks a lot guys you have been a great help.

I'll let you know how I get on.

Kindest regards

Cillies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top