Is there a function for Converting a Decimal into BINARY ?

Поиск
Список
Период
Сортировка
От Ow Mun Heng
Тема Is there a function for Converting a Decimal into BINARY ?
Дата
Msg-id D1109E8B2FB53A45BDB60F8145905CE9037D5C79@wdmyexbe03.my.asia.wdc.com
обсуждение исходный текст
Ответы Re: Is there a function for Converting a Decimal into BINARY ?
Re: Is there a function for Converting a Decimal into BINARY ?
Список pgsql-general
Hi Guys,

Searching the net didn't give me much clues as to how to convert a Decimal
number into BINARY.


Eg:
I have a datatype in the DB which needs to be converted.

DEC = 192
BINARY = 11000000

DEC = 197
BINARY = 11000101

Which I then need to break down into pairs to do calculations on

11 : 00 : 00 : 00
11 : 00 : 01 : 01

Some of the solutions I've seen on the Internet is based on VB and mainly
userland apps, I would like to do the conversion within PG itself.

Thanks

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Viable alternatives to SQL?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Is there a function for Converting a Decimal into BINARY ?