Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Write a set_bit function in Oracle

user8101600Oct 30 2014 — edited Oct 31 2014

Hi,

I have a query in Postgres which uses a set_bit function.  I need to convert this query into Oracle.  However, I cannot find the function which does the exact same thing.   Can someone please give me a pointer?  Can I use combination of different functions in Oracle to achieve the same thing?  Can someone give me a suggestion?  Thank you!

Below is the definition of what set_bit does in Postgres: 

Function

Return Type

Description

Example

Result

set_bit(string, offset,newvalue)

bytea

Set bit in string

set_bit(E'Th\\000omas'::bytea, 45, 0)

Th\000omAs

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 28 2014
Added on Oct 30 2014
6 comments
1,777 views