Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: bitwise or on column
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...Received on Tue Jul 16 2002 - 05:55:57 CDT
> 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
>
>
![]() |
![]() |