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

  • ... 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

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • also ... this is redshift, it maybe faster to SELECT * FROM WHERE ... is null 

    than executing a DELETE statement.

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"