Hello @Howes, Stephen,
Here's an example query that demonstrates how to extract individual bits from a byte value and store them as Boolean values:
WITH input AS (
SELECT CAST('80' AS bigint) AS byteValue
)
SELECT
byteValue,
(byteValue & 128) > 0 AS bit7,
(byteValue & 64) > 0 AS bit6,
(byteValue & 32) > 0 AS bit5,
(byteValue & 16) > 0 AS bit4,
(byteValue & 8) > 0 AS bit3,
(byteValue & 4) > 0 AS bit2,
(byteValue & 2) > 0 AS bit1,
(byteValue & 1) > 0 AS bit0
INTO
output
FROM
input
Please let us know if you have further questions!