Thread: sum up rows of BITs

sum up rows of BITs

From
"Thomas T. Thai"
Date:
i would like to do a SELECT that would return a result by AND-ing all the
BIT's. It seems I'd need a function to operate on all the BITs. How do I
do that?

CREATE TABLE "blah" (
  "perm" BIT(31) NOT NULL,
  "name" CHARACTER(10) NOT NULL
);


SELECT some_bit_func_to_and("perm") FROM "blah";

is there another way of doing this w/o having to create a custom function?