New line character

  • Thread starter Rohit Chitre via AccessMonster.com
  • Start date
R

Rohit Chitre via AccessMonster.com

Hi ,

I have a table with data over 1 lak records . Few of these records have New
line characters appended to them. Is there any way to remove this new line
character?

Thanks in advance
Rohit
 
J

John Nurick

Hi Rohit,

Use an update query with a criterion like this, where XXX is the name of
the field.

Right([XXX], 2) = Chr(13) & Chr(10)

and an Update To expression like this

Left([XXX], Len([XXX]) - 2)

In SQL view it's something like
UPDATE MyTable
SET XXX = Left([XXX], Len([XXX]) - 2)
WHERE Right([XXX], 2) = Chr(13) & Chr(10)
;



This assumes that they have the standard Windows CR+LF for newline; if
it's something else, adjust the expressions as appropriate.
 

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