View previous topic :: View next topic
|
Author |
Message |
SENTHIL MURUGAAN Warnings : 1 New User
Joined: 12 Jan 2013 Posts: 32 Location: India
|
|
|
|
Is it possible to store Hexadecimal value in DB2?. If yes, then please share the procedure.
Advance thanks
Senthil |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
expat
Global Moderator
![](images/avatars/2056053929462b07d8d6da7.jpg)
Joined: 14 Mar 2007 Posts: 8795 Location: Welsh Wales
|
|
|
|
What research have YOU done to try to find an answer for yourself as this seems to be a fairly basic question. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Everything is stored as as 1 and 0 bits. How that is interpreted is up to you. Hex is just a short-hand way of interpreting those bits. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
jerryte
Active User
![](images/avatars/5181991144d7a75e6a4ab9.jpg)
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
If the column is defined as CHAR then you can store any bytes of data. You can use the HEX() function to convert from bytes into a hexadecimal string. |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
Rohit Umarjikar
Global Moderator
![](images/avatars/9945761725c07e82d150f2.jpg)
Joined: 21 Sep 2010 Posts: 3059 Location: NYC,USA
|
|
|
|
This is a beginners forum question
Perhaps why don’t you tell us the need to store it in hex? |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
Auryn
New User
![](images/avatars/151376474148ff3a956eabd.gif)
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
... And if you'd like to insert or update, you can use x'F0F1F2'... |
|
Back to top |
|
![](templates/skyLineGrey/images/spacer.gif) |
|