PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Delete 'mystery' character from data (possibly carriage return)

 
 
Steve
Guest
Posts: n/a
 
      12th Jan 2010
Hi,

I've imported an XML file into a new access database and have a number of
tables of information. I have a bit of problem with the data that's been
imported though - where it's present it's always preceded by a . I can't
select the character. If in one table I've got a lot of dates where ![Year] =
1972, I can't filter the results of a query based on the table by putting
"1972" in the criteria of the query - I get 0 rows.

I think that the  character represents a carriage return, although I may be
wrong. Does anyone know how I can delete it from my data?

Any help much appreciated as always!
--
Regards,

Steve
 
Reply With Quote
 
 
 
 
Jerry Whittle
Guest
Posts: n/a
 
      12th Jan 2010
There's a bunch of strange characters that can show up as the little square.
So the first thing to do is find out which one. Use a combination of the Asc
and maybe the Mid functions to find out the Ascii code. It's the first
character, just the ASC function will work. Try this in a query:

TheCode: Asc([Year])

Sort on this field. Most of the strange codes will be below 30.

Then look up the returned numbers in an ASCII chart using Bing or Google.
That will tell you the codes. Here's one:
http://msdn.microsoft.com/en-us/library/4z4t9ed1(VS.80).aspx

Next use the Replace function to get ride of them:

ReplaceIt: Replace([SpecialCharactersText]," ","")

The trick is to put the special character code between the second set of
quotation marks. For the code 160 you would do this:

Hold down the Alt key and type in 0160 using the keypad. Make sure to put a
" before then after the Alt+0160.

A couple of warnings. First make a copy of that table just in case
something goes wrong. Also the "" is a zero length string. If you have any
of the squares in a field that has no other data, it might cause problems if
you are looking for Nulls because a ZLS is not a null.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Steve" wrote:

> Hi,
>
> I've imported an XML file into a new access database and have a number of
> tables of information. I have a bit of problem with the data that's been
> imported though - where it's present it's always preceded by a . I can't
> select the character. If in one table I've got a lot of dates where ![Year] =
> 1972, I can't filter the results of a query based on the table by putting
> "1972" in the criteria of the query - I get 0 rows.
>
> I think that the  character represents a carriage return, although I may be
> wrong. Does anyone know how I can delete it from my data?
>
> Any help much appreciated as always!
> --
> Regards,
>
> Steve

 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      13th Jan 2010
Brilliant! Many thanks for your help, I've now been able to write a procedure
to whizz through each table in the db and get rid of the characters making it
useable :-)


--
Regards,

Steve


"Jerry Whittle" wrote:

> There's a bunch of strange characters that can show up as the little square.
> So the first thing to do is find out which one. Use a combination of the Asc
> and maybe the Mid functions to find out the Ascii code. It's the first
> character, just the ASC function will work. Try this in a query:
>
> TheCode: Asc([Year])
>
> Sort on this field. Most of the strange codes will be below 30.
>
> Then look up the returned numbers in an ASCII chart using Bing or Google.
> That will tell you the codes. Here's one:
> http://msdn.microsoft.com/en-us/library/4z4t9ed1(VS.80).aspx
>
> Next use the Replace function to get ride of them:
>
> ReplaceIt: Replace([SpecialCharactersText]," ","")
>
> The trick is to put the special character code between the second set of
> quotation marks. For the code 160 you would do this:
>
> Hold down the Alt key and type in 0160 using the keypad. Make sure to put a
> " before then after the Alt+0160.
>
> A couple of warnings. First make a copy of that table just in case
> something goes wrong. Also the "" is a zero length string. If you have any
> of the squares in a field that has no other data, it might cause problems if
> you are looking for Nulls because a ZLS is not a null.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "Steve" wrote:
>
> > Hi,
> >
> > I've imported an XML file into a new access database and have a number of
> > tables of information. I have a bit of problem with the data that's been
> > imported though - where it's present it's always preceded by a . I can't
> > select the character. If in one table I've got a lot of dates where ![Year] =
> > 1972, I can't filter the results of a query based on the table by putting
> > "1972" in the criteria of the query - I get 0 rows.
> >
> > I think that the  character represents a carriage return, although I may be
> > wrong. Does anyone know how I can delete it from my data?
> >
> > Any help much appreciated as always!
> > --
> > Regards,
> >
> > Steve

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is that character, carriage return? John Smith Microsoft Word New Users 1 11th Sep 2009 07:10 PM
Search and replace hard-line-return character, not carriage return =?Utf-8?B?VHlsZXIgVA==?= Microsoft Word Document Management 2 16th Aug 2006 09:11 PM
Carriage return character =?Utf-8?B?YWxyYXN0cm8=?= Microsoft Excel Programming 8 14th Aug 2006 06:37 PM
Carriage Return Character Burt Rosner Microsoft Frontpage 8 13th Feb 2004 06:47 AM
Carriage Return Character Burt Rosner Microsoft Access Getting Started 6 13th Feb 2004 06:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:08 AM.