Text Export needs CR/LF at end - how to??

G

Guest

Using Access 03 - Exporting table to Text with ~ delimiter. Receiving system
is Unix and requires CR or LF to separate the records as it reads - currently
it reads the 1000+ records as one.
 
K

Ken Snell \(MVP\)

Try adding a calculated field to your query that is the CR character:

MyCR: Chr(13)
 
G

Guest

my query is simply a Select (records) ... from (table) statement.
how exactly would i add this?
i am not a SQL expert
 
K

Ken Snell \(MVP\)

Open the query in Design view. Go to the first empty column, and click in
the Field: cell. Type this:
MyChar: Chr(13)
Be sure that the "Show" checkbox is checked to "yes".

That will write a CR character as the last value in each row.
 
J

John Nurick

If you're using TransferText to export the table, it automatically uses
CRLF (\x0D0A) anyway.

But in Unix the standard newline is just LF (\x0A), so maybe it's the
CRs that are causing the trouble. Try filtering them out of the file: a
web search for something like
convert text windows unix
will find a variety of utilities that can do this.

If the Unix system parses the filtered file correctly, include the
filtering in the regular workflow (with luck it will just mean adding a
line to a shell script on the Unix side, or you can do it in Access
VBA).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top