Home » Developer & Programmer » Forms » How to create Hex value in Form6 (Product:Form Bilder 6, OS: Windows XP)
icon9.gif  How to create Hex value in Form6 [message #347263] Thu, 11 September 2008 03:46 Go to next message
oracle_user1
Messages: 45
Registered: May 2008
Member
Hi to all,

How to generate the value to hexadecimal code.

create table test
(trxno varchar2(15),
trxdt date)

I want store the trxno in hexadecimal code.

Hope can get help from you all experts there.

Thanks.

Regards,
oracle user
Re: How to create Hex value in Form6 [message #347383 is a reply to message #347263] Thu, 11 September 2008 07:47 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Hexadecimal? You mean, using digits from 0 - 9, as well as letters A - F?

If that's so, knowing that "trxno" column is of a character datatype, no problem; just insert a value into this column, such as
SQL> insert into test (trxno) values ('BC1');

1 row created.

SQL>

On the other hand, if you want to convert a decimal (or binary or octal or ...) number into a hexadecimal one, that's another problem which, actually, has nothing much to do with Oracle, but your ability to adjust decimal -> hexadecimal conversion algorithm into Oracle (PL/)SQL code.

Or, you might even use available TO_NUMBER and TO_CHAR functions to do the job, such as
SQL> select to_char(3009, 'xxxx') dec_to_hex from dual;

DEC_T
-----
  bc1

SQL> select to_number('bc1', 'xxx') hex_to_dec from dual;

HEX_TO_DEC
----------
      3009

SQL>
Previous Topic: Oracle 10g Database is not starting after installing FORM6i on same machine.
Next Topic: record group problem with global
Goto Forum:
  


Current Time: Sun Dec 11 00:46:28 CST 2016

Total time taken to generate the page: 0.27932 seconds