dbTalk Databases Forums  

how to remove carriage returns

comp.databases.filemaker comp.databases.filemaker


Discuss how to remove carriage returns in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
marc.servin@gmail.com
 
Posts: n/a

Default how to remove carriage returns - 12-29-2006 , 07:50 PM






I imported my old DOS database into FileMaker 8.5, and find there are
lots of fields that have carriage returns in them. This messes things
up when I use merge fields, for example, if there is a carriage return
at the end of an address1 field, or an apparently empty address2 field
that actually contains an invisible carriage return, I get blank lines
when I make labels, address block, etc. How to find and get rid of
these carriage returns without going through all 16,000 records one by
one?

thanks
Marc


Reply With Quote
  #2  
Old   
Bill Marriott
 
Posts: n/a

Default Re: how to remove carriage returns - 12-29-2006 , 09:56 PM






Easiest way is to use search-and-replace in a word processor or text editor.

1) Before export, add a field to your DOS database and make sure it's at the
very end of your export order. Fill this field with a unique character
combination, such as "~!~" -- now you have a convenient record marker in
addition to the usual return.

2) Search for all returns and replace them with another unique identifier,
such as "%R%"

3) Search for ~!~%R% (if you put the record marker field at the end of the
export order) and replace that with a return. Note, you might actually need
to search for

,"~!~"%R%

or similar, to take care of the delimiter and such. But the idea is that the
record marker together with the return marker indicates the true end of
records.

4) Search for any remaining %R% and replace those with ASCII(11). FileMaker
uses ASCII(11) to indicate returns within fields.


<marc.servin (AT) gmail (DOT) com> wrote

Quote:
I imported my old DOS database into FileMaker 8.5, and find there are
lots of fields that have carriage returns in them. This messes things
up when I use merge fields, for example, if there is a carriage return
at the end of an address1 field, or an apparently empty address2 field
that actually contains an invisible carriage return, I get blank lines
when I make labels, address block, etc. How to find and get rid of
these carriage returns without going through all 16,000 records one by
one?

thanks
Marc




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.