Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: bitwise or on column

Re: bitwise or on column

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Tue, 16 Jul 2002 14:55:57 +0400
Message-ID: <ah0u6b$1u1$1@babylon.agtel.net>


If you are on 9i, take a look here:
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/appdev.901/a88896/dci11agg.htm#1004 615

and consider creating a user-defined aggregate function for this purpose. I think it's pretty easy to create bitwise or aggregate function in plain PL/SQL. Regretably, user-defined aggregate functions are not available in releases prior to 9i.

--
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"Stephan Bressler" <stephan.bressler_at_siemens.com> wrote in message
news:ah0r4e$a82$1_at_news.mch.sbs.de...

> Hi all,
>
> I'm looking for a function doing a bitwise or on a column (number)
> containing permissions, e.g. 1=read, 2=write, 4=exec, ... (so 5 = exec+read
> permission).
> There are several rows per user and all permissions should be aggregated.
> The function should be used like
>
> select bitor(permissions)
> from acl
> where username='scott tiger';
>
> TIA
> Stephan
>
>
Received on Tue Jul 16 2002 - 05:55:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US