Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQL to convert from decimal to Binary?

1,553 views
Skip to first unread message

CrazyKarma

unread,
Dec 2, 2009, 4:57:50 PM12/2/09
to
Is there a readily available function to convert from decimal to
binary in SQL? I am not looking for PL/SQL function..plain vanilla
SQL.

Thanks

ck

jimmyb

unread,
Dec 2, 2009, 6:28:59 PM12/2/09
to

num_to_bin - convert decimal number to binary

jimmyb

unread,
Dec 2, 2009, 6:33:23 PM12/2/09
to
On Dec 2, 1:57 pm, CrazyKarma <ska...@gmail.com> wrote:

my bad...I was thinking of bin_to_num. You could roll your own
function to do that. I'm not aware of a built-in function to convert
decimal to binary.

hpuxrac

unread,
Dec 2, 2009, 7:20:49 PM12/2/09
to
On Dec 2, 4:57 pm, CrazyKarma <ska...@gmail.com> wrote:

snip

Look at the stuff in utl_raw

Mark D Powell

unread,
Dec 3, 2009, 9:39:11 AM12/3/09
to

You might also find the query posted to the asktom thread on hex to
decimal conversion of interest plus there is a link to a number
conversion package Tom wrote:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7041297073738

HTH -- Mark D Powell --

CrazyKarma

unread,
Dec 3, 2009, 4:57:28 PM12/3/09
to
Mark,

See my other update on the char(1)VsNumber(1). I did finally settle
for something that you made a passing reference to. about BITAND.

Thanks
CK

0 new messages