Hex/Octal/Binary Formatting

Discuss the database features
Post Reply
scienceyankee
Posts: 8
Joined: Sun Jan 15, 2017 3:11 pm

Hex/Octal/Binary Formatting

Post by scienceyankee »

I am putting together a database using Base, and would like to have the key fields formatted in hex. I cannot find any formatting code to permit this; does this exist as an undocumented feature or is should I put in a feature request?
Apache OpenOffice 4.1.3
AOO413m1(Build 9783) Rev 1761381

Windows 10 Home
UnklDonald418
Volunteer
Posts: 1548
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Hex/Octal/Binary Formatting

Post by UnklDonald418 »

Base key fields are usually of data type Integer or Long. Like Decimal, Octal and Hexadecimal are simply alternate ways of displaying a numeric value as a string.
According to Andrew Pitonyak in his book “OpenOffice.org Macros Explained”
OOo users almost always use decimal numbers
If you are willing to venture into macro coding, Star Basic does have functions Hex(number) and Oct(number) which convert the number to the appropriate string.
I'm not aware of any equivalent SQL functions.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
scienceyankee
Posts: 8
Joined: Sun Jan 15, 2017 3:11 pm

Re: Hex/Octal/Binary Formatting

Post by scienceyankee »

My general preference is numbers used as keys be in hex or octal form; this is primarily to remind people that arithmetic with them is not useful ;)

I've not done SQL for a while, and that was through an API, so the calling program would do all the formatting (it's all bits ;)). I think there is an SQL formatting code to display numbers in hex (see http://docs.oracle.com/cd/B19306_01/ser ... #sthref402)
Apache OpenOffice 4.1.3
AOO413m1(Build 9783) Rev 1761381

Windows 10 Home
Post Reply