I see you're using Postgres' CAST syntax.
Would be neat if this was possible in Oracle - which is not the case (as I wrote in the post).
I agree on the thing that I could just use the whole bit array, but I wanted to implement it as relatable to the original puzzle test as possible.
Hi! I think this solution is way overcomplicated. You can simply cast it into bit(10) then an integer.
Here is my solution:
select
max(translate(rec, 'FLBR', '0011')::bit(10)::integer)
from day5;
Also you don't need to care about the rows and columns in part 1 because it is a single bit array.
I see you're using Postgres' CAST syntax.
Would be neat if this was possible in Oracle - which is not the case (as I wrote in the post).
I agree on the thing that I could just use the whole bit array, but I wanted to implement it as relatable to the original puzzle test as possible.
Oh, I didn't realize, that you're using Oracle.