Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Convertin hex string to raw

Re: Convertin hex string to raw

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: 1997/06/26
Message-ID: <33b49684.2345352@news.u-net.com>#1/1

Hello,
  I have misunderstood the problem.

Are you saying that you left the numbers in there internal binary format ( except how and why did you convert them to hex?). OR did you convert the numbers to printable ascii characters?

How do i put this:
  Does each character of your string have the range of character valies from binary 1 to binnary 255 or does it only contain printable characters (binary 28 ) to binary 127.

If each character can have the full range of binary values then i suggest you convert then to ascii hex strings yourself and store them in long fields. If they already only contain printable characters then i suggect you use long fields as there is no conversion to raw required. All the raw conversions do is convert binary to printable strings taking up 2 bytes and back again.

Since you or Oracle have to convert them it will cheaper to convert them withe something which doesn't use PL/SQL to convert a long string one character at a time.

these are just my opinions. If i have missed the point then i am sorry for wasting your time.

graham

tcbracey_at_st.usm.edu (Timothy C. Bracey) wrote...

| Does anyone know how to convert a hexidecimal string to a raw value. The
| character string in 80 characters in length which represent 10 hexidecimal
| values. For example, we converted to longitude value of 37.7 to
| 377000000 by multiplying 37.7 by 10 to the 7th to get a whole number. We
| then converted the large integer value to it's hex equivalent. We did the
| same for the other 9 values and concatenated them all together as one long
| string to save space of having to store all the longitude values in
| seperate fields. Also this was done becase the values are points of a
| polygon which represent a country. Now that we have all the points stored
| as one contiguos string, how do we store this value into a raw or long
| raw value. I pondered the possibility of using the hextoraw function, but
| it only works on one single hex value and not a string of hex values. I've
| even pondered breaking up the hex string using the substr function to
| convert each value to a raw. I can do that, but I don't need x many raw
| values I need one raw equivalent of the hex string. I hope I have
| carefully explained my problem. Any suggestions or help is welcomed.
| Thank you.
|
| Thank you.
|
| Thank you.
|
|
| --
| ---------------
| Timothy Corey Bracey
| Southern Station Box 4591
| University of Southern Mississippi
| Hattiesburg, MS 39406
| E-Mail: tcbracey_at_sushi.st.usm.edu
| Campus Phone: 601-266-1037

Graham Miller ...
Opinions expressed are mine, they are free, and worth exactly what they cost. Received on Thu Jun 26 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US