Help in viewing the junk character

Hello All,

I have issues in unix file when I loaded that to database and do

select * from table where description  like '%'+char(13)+'%'  

on it I am able to get records. I tried to view the file in unix it is all having blank character which I think is all non ascii which I am not able view. Can you please help me a way to identify the junk character

  1. I used cat -v, I still see empty spaces
    2 I used od -c, I still see empty spaces
    3 I used vim -b , I still see empty spaces
    4 I used sed as
sed -n 'l' prj48n.cls

below is my output

0438After Shave                   $

Thanks
Arun

Well, you could try opening the file using vi
and then:

:set list

Quick vi tip: Show Hidden Characters

Also, not sure what database you're loading to, however, if it is Oracle, you could use DUMP to show the characters:

select DUMP(col_name) from table where description like .... 

Hello ,

I tried to do a

set list 

in vi and

list 

in vim both showing that as blank character. When I load the same file to my sybase database it is showing junk character as char(13). I mean when I do select on char(13) it is showing records

Thanks,
Arun

Why don't you post the output of od -c or even od -tx1c of that file?

Hello,

Please find the output below

(p009:p3:/pl/data>)

od -c p48n.cls
0000000   0   4   3   8   A   f   t   e   r       S   h   a   v   e
0000020
0000040          \n
0000043

(p009:p3:/pl/data>)

od -tx1c p48n.cls
0000000 30 34 33 38 41 66 74 65 72 20 53 68 61 76 65 20
          0   4   3   8   A   f   t   e   r       S   h   a   v   e
0000020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20

0000040 20 20 0a
                 \n
0000043

Thanks,
Arun

Please use code tags around data/output as well!

OK, no junk chars, just a lot spaces. That's an all ascii *nix file.

Thanks ...:confused: But I am not sure how this space is converted to char(13) -- ctrlM character in database when I load it

Thanks
Arun

What DB? How do you load it? Any control file?

it is a sybase DB , we load it as BCP in to a table

Thanks
Arun

Hi,

thanks

but how if i need to fetch this charcater in loop and need to do another action, then how i can do.

Are you able to view the special char from you DB using char(13) ? . Also are you trying to catch each character in a variable and check for special character and decide operation based on that ?

Thanks,
Arun

sorry arun, am not getting your point