Dropping rows with null values (postgres)

I am building a redshift dataflow and found that the following statement allsow you to delete whole rows, but I get an error:

 

DELETE from "table name"
where "variable name" is NULL

 

I use it in a table to transform my data and get tis error: Table transform must be a SELECT clause

 

How come?

Comments

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    ... there are two transform types.  one will CREATE TABLE the other will allow you to execute a SQL statement.  Choose the right one.

     

     

    Capture.PNG

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    also ... this is redshift, it maybe faster to SELECT * FROM WHERE ... is null 

    than executing a DELETE statement.