I have in my redshift database a field of the SUPER type:
It contains
{
"Order": {
"OrderNumber": "Ab1234ZX",
"ReasonDelay": "No reason",
"ReasonDelay": false
}
}
The problem is that I have two attributes with the same name (ReasonDelay
) but different values ("No reason"
and false
).
select
e.contents."Order"."ReasonDelay" as first_reason,
e.contents."Order"."ReasonDelay" as second_reason
from
orders e
obviously gives me the same results. using [0]
and [1]
(obviously) does nothing:
select
e.contents."Order"[0]."ReasonDelay" as first_reason,
e.contents."Order"[1]."ReasonDelay" as second_reason
from
orders e
select
e.contents."Order"."ReasonDelay"[0] as first_reason,
e.contents."Order"."ReasonDelay"[1] as second_reason
from
orders e
How do I query this?