Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to identify a non-printable character 2

Status
Not open for further replies.

hovercraft

Technical User
Jun 19, 2006
236
US
Greetings,

I have a table in which data has been improperly delimited.
A field contains values for multiple fields and is separated by some sort of non-printable character. Basically it shows as a box.
I've been trying to figure out how to identify which ascii chr it is so that I can correct each record containing this "character".
The character usually shows up in the fourth space from the right.

Any thoughts on how to go about identifying the unknown?

Thanks,
Hovercraft
 
I guess on Chr(13) and/or Chr(10).

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
In MS ACCESS, use Asc(Mid(FIELD_NAME,start,length))

In Access, this gives you the Dec ASCII value which you can then lookup.

Example my column is called INITIAL, and this record has a valid value in the first space, but invalid in second space.

Expr1:Asc(Mid(INITIAL,1,1));
Expr2:Asc(Mid(INITIAL,1,2));

Expr1 = 68, which is the letter 'D' in ASCII.
Expr2 = 32, which is a SPACE.

In your case, do the Asc(Mid... on the characters you think is incorrect to see the data and find a hex/dec ascii chart.
 
Bravo Wolves! I used Asc in conjunction with Mid as you suggested and it turns out that in was chr(10), however there could be others and in other fields. I'll just have to clean-up step-by-step.

I ended up using InStr to compare the field values and chr(10) for my first scrub set.

This is what happens when people don't pay attention.

Thanks !

PHV, I tried 13 but would have never thought that a Line Feed would be smack dab in the middle of a record. Thanks for the suggestion.

 
PHV, I tried 13
Reread my post: I suggested 10 too ...
 
yes you did. Sorry if I wasn't clear. I was refering to prior to me posting the question, I had tried looking for 13 but didn't think of 10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top