Solved

Export Memo field to csv file

Posted on 2004-03-29
10
865 Views
Last Modified: 2007-12-19
I have a table with Memo fields that contain "dirty" unstructured data - characters within the fields include commas, quotes, html (<br>, etc.).  These memo fields are used to display direction sets to physical locations (ex. 12345 Smith Street).

I need to export these fields in csv format for inclusion in an email.  

However, I can't get these fields to export "nicely" - a single line per record set.

When I attempt to view the data using any number of editors (ultra edit, etc....even notepad), it's badly formatted.

Suggestions?

0
Comment
Question by:RBielecki
  • 3
  • 3
10 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 10709256
0
 
LVL 50

Accepted Solution

by:
Steve Bink earned 125 total points
ID: 10709342
I don't think you'll be able to get them to export 'nicely'.  A CSV file is usually delimited.  That means commas, colons, etc., are used to separate the fields for each record.  Since your memo field uses these characters as data (including quotes) that method will not work for you.

The other option is a structured csv file with a set number of character positions per field.  I wouldn't exactly call the resulting file 'nicely' exported since it will not necessarily be in a readable format.  There's also no guarantee that the memo field will be all on one line since it obviously can incorporate line feeds and carriage returns in the text.

Is there a reason you need it to be a text file as opposed to a binary file?  You may just have to accept the poor formatting otherwise...
0
 
LVL 54

Expert Comment

by:nico5038
ID: 12514536
Dear RBielecki,

Giving a "C" grade without explanation isn't really encouraging experts to help you.
When you're not satisfied with the proposed solution the proper action is to add a comment what's missing in the comment(s) to enable us to help you further.

Nic;o)
(Please check: http://www.experts-exchange.com/help.jsp#hi73 as routinet has now the possibility to ask deletion of the question!)
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 50

Expert Comment

by:Steve Bink
ID: 12537279
Quite so...and I object to the grade.  

I offered all the relevent information I had given the description of the problem.  Since the questionner never replied to my request for more information (i.e., is a text file mandatory), neither of us were able to explore other options with them, such as binary data files, VB routines to format the memo field, exporting to an HTML page, or normalizing the memo field into a secondary table.

Even without that, assuming that it MUST be a text file and the memo field cannot be changed at all, my solution was to accept the poor formatting, since that is pretty much the only path available.  As we are all well aware, "can't be done" is sometimes a valid solution...

http://www.experts-exchange.com/Community_Support/Q_21200518.html
0
 

Author Comment

by:RBielecki
ID: 12537338
You make a valid point and I'm OK assigning a higher 'grade.'  What's the best way to rectify?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 12537441
Post a zero points question at http://www.experts-exchange.com/Community_Support/ with the URL of this question.

Nic;o)
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 12538007
LOL...how many requests ended up getting posted?

RBielecki: Would you please let me know what route you eventually decided on with this project?  I had several ideas on how to start looking at this, and if you have come up with another I can add it to my arsenal.  :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now