0

I have certain rows in columns that have the phrase 'empty text' in the cell of a table in dremio.

When I try queries like:

select col1 from table1 where col1 is null

I get no results back for rows that have the text 'empty text' in them.

How do I query the 'empty text' fields or change the data type of empty fields to 'null' in dremio?

RustyShackleford
  • 3,462
  • 9
  • 40
  • 81

1 Answers1

0

Use case statement to cast empty cells to null like so:

CASE WHEN column1= '' THEN NULL ELSE column1 END AS column1
RustyShackleford
  • 3,462
  • 9
  • 40
  • 81