Solved

Export Memo field to csv file

Posted on 2004-03-29
10
885 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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