Oksana Ok
Oksana Ok

Reputation: 555

BigQuery Nested Table - if nested record do not exist?

Have a straight question.

If the record is is null in SQL we use WHERE XXX is null

How about if nested records do not exist at all, like this: enter image description here

WHERE XXX is empty???

What I would like to do? - Need to filter out records which do not have anything in OrderLines

Upvotes: 1

Views: 598

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 173036

Nested record is an array - to check if array is empty - I would use

WHERE ARRAY_LENGTH(OrderLines) = 0 

Upvotes: 3

Related Questions