Home > Back-end >  Bigquery Clean records when value is empty
Bigquery Clean records when value is empty

Time:09-16

I'm trying to clean the related records when type value is empty, please see below sample data:

session Type
123
456 pdp

I've written below:

select *
from table 
where Type is not null

However the "is not null" didn't clean empty record, it still returns the exact same sample table. Any suggestions how to make it right? Thanks.

CodePudding user response:

select * from table where Type is not null or TRIM(Type) = ''

Here the value is not null , it's empty.

CodePudding user response:

Answer my own question, can use length (Page_Type) > 0 to workaround

  • Related