varchar2 to hex/octal ... convert string

  • Follow


is there way to 'dump' a string (varchar2) to the screen in hex?

"this is a string"  would print something like "33 44 23 64 345 43
34 ..."  (I just made that up)

We started using unicode and there are a few fields that should match
but do not.  We have to see below the characters printed to the
screen.  Something snuck in there.

We tried using Toad's grid editor to look at this field, but it
crumps.  Strange.

select char_to_hex(field) from table;

Thank you.
10g
0
Reply okey 9/12/2010 5:07:32 PM

On Sep 12, 12:07=A0pm, okey <oldyor...@yahoo.com> wrote:
> is there way to 'dump' a string (varchar2) to the screen in hex?
>
> "this is a string" =A0would print something like "33 44 23 64 345 43
> 34 ..." =A0(I just made that up)
>
> We started using unicode and there are a few fields that should match
> but do not. =A0We have to see below the characters printed to the
> screen. =A0Something snuck in there.
>
> We tried using Toad's grid editor to look at this field, but it
> crumps. =A0Strange.
>
> select char_to_hex(field) from table;
>
> Thank you.
> 10g

Well we used C to dump it.. There are a mix of UNIX and DOS \nl
characters.  We'll have to convert them all to one or the other...
Now, got to figure out that.
0
Reply okey 9/12/2010 5:35:01 PM


"okey" <oldyork90@yahoo.com> a �crit dans le message de news: 65276a89-c87b-408c-8975-abde2b69a1e4@n7g2000vbo.googlegroups.com...
| is there way to 'dump' a string (varchar2) to the screen in hex?
|
| "this is a string"  would print something like "33 44 23 64 345 43
| 34 ..."  (I just made that up)
|
| We started using unicode and there are a few fields that should match
| but do not.  We have to see below the characters printed to the
| screen.  Something snuck in there.
|
| We tried using Toad's grid editor to look at this field, but it
| crumps.  Strange.
|
| select char_to_hex(field) from table;
|
| Thank you.
| 10g

SQL> select dump('michel',16) from dual;
DUMP('MICHEL',16)
-------------------------------
Typ=96 Len=6: 6d,69,63,68,65,6c

Regards
Michel


0
Reply Michel 9/12/2010 5:57:06 PM

On Sun, 12 Sep 2010 19:57:06 +0200, Michel Cadot wrote:

> SQL> select dump('michel',16) from dual; DUMP('MICHEL',16)
> -------------------------------
> Typ=96 Len=6: 6d,69,63,68,65,6c

Just to clarify the remaining issues:
For octal dump, it's
SQL> select dump('michel',8) from dual;

DUMP('MICHEL',8)
-------------------------------------
Typ=96 Len=6: 155,151,143,150,145,154

Elapsed: 00:00:00.10

For the strictly numeric conversion, there is a good article here:
http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkytehexdec.html


-- 
http://mgogala.byethost5.com
0
Reply Mladen 9/13/2010 6:31:11 PM

On 09/12/2010 07:07 PM, okey wrote:
> is there way to 'dump' a string (varchar2) to the screen in hex?
>
> "this is a string"  would print something like "33 44 23 64 345 43
> 34 ..."  (I just made that up)
>
> We started using unicode and there are a few fields that should match
> but do not.  We have to see below the characters printed to the
> screen.  Something snuck in there.
>
> We tried using Toad's grid editor to look at this field, but it
> crumps.  Strange.
>
> select char_to_hex(field) from table;
>
> Thank you.
> 10g
select dump(column1,16) from tablea;

You owe me a cup of coffe for reading the manual for you

-- 

Regards,

Frank van Bortel
0
Reply Frank 9/15/2010 8:10:14 AM

On 09/12/2010 07:57 PM, Michel Cadot wrote:
> "okey"<oldyork90@yahoo.com>  a �crit dans le message de news: 65276a89-c87b-408c-8975-abde2b69a1e4@n7g2000vbo.googlegroups.com...
> | is there way to 'dump' a string (varchar2) to the screen in hex?
> |
> | "this is a string"  would print something like "33 44 23 64 345 43
> | 34 ..."  (I just made that up)
> |
> | We started using unicode and there are a few fields that should match
> | but do not.  We have to see below the characters printed to the
> | screen.  Something snuck in there.
> |
> | We tried using Toad's grid editor to look at this field, but it
> | crumps.  Strange.
> |
> | select char_to_hex(field) from table;
> |
> | Thank you.
> | 10g
>
> SQL>  select dump('michel',16) from dual;
> DUMP('MICHEL',16)
> -------------------------------
> Typ=96 Len=6: 6d,69,63,68,65,6c
>
> Regards
> Michel
>
>
Oops - replied before reading all of the thread

-- 

Regards,

Frank van Bortel
0
Reply Frank 9/15/2010 8:10:46 AM

5 Replies
1958 Views

(page loaded in 0.1 seconds)

Similiar Articles:













7/19/2012 6:18:50 PM


Reply: