how i will put null values in place of dataset containing zeroes in place of missing values. can you help me with the solutuion?
in the new dataset the missing values were replaced by zeroes instead of null values. what function i should choose to put null values ?
2
Answers
What is dataset?
If it is a table with a column where values (some of them) are 0 and you want to change them to null then:
If dataset is result of some query then maybe something like…
… and if you want all null values in query result then…
What exactly does Generate mean here? you are looking for a Select statement that replaces if the value is zero to Null. If yes Check this.
Use Case Statement in SQL.
SELECT product_name,
CASE
WHEN price = 0 THEN NULL ELSE price
END
FROM products;