Home » SQL & PL/SQL » SQL & PL/SQL » How to manipulate data at bit level?
How to manipulate data at bit level? [message #248332] Thu, 28 June 2007 12:24 Go to next message
rupaliaggarwal
Messages: 1
Registered: June 2007
Junior Member
Hello,
I want to do bit manipulation on data stored in a table. What data type should i use and how can i retrieve the value of each bit.
Re: How to manipulate data at bit level? [message #248340 is a reply to message #248332] Thu, 28 June 2007 12:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use RAW and UTL_RAW package but Oracle does not directly work with bit.

Regards
Michel
Re: How to manipulate data at bit level? [message #248364 is a reply to message #248340] Thu, 28 June 2007 14:08 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
do be aware of bitand though...
http://www.techonthenet.com/oracle/functions/bitand.php
Re: How to manipulate data at bit level? [message #248368 is a reply to message #248364] Thu, 28 June 2007 14:24 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
UTL_RAW package has a documented and supported bitand function.

Regards
Michel
Re: How to manipulate data at bit level? [message #255130 is a reply to message #248332] Mon, 30 July 2007 13:32 Go to previous message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
however, be aware of what you are doing. If you truly have to manipulate data at the bit level, do it. If you are simply storing flags using bits, make them individual columns to hold flags. Bit manipulation would be slower then setting or referencing a separate column. Storage is cheap, processing speed isn't.
Previous Topic: Writing output from variables in pl/sql to unix shell script
Next Topic: To drop all constraints of a table
Goto Forum:
  


Current Time: Tue Dec 06 12:31:34 CST 2016

Total time taken to generate the page: 0.13741 seconds