Hi,
I have a dataset via in-DB tool which includes null values that i would like to replace with 0. I'll be making calculations on the columns using the formula in-db tool, but it currently doesn't read these null values so the output remains null.
I understand we can use the data cleanse tool, but i'll need to data stream out in order to do this and the second part of the workflow involves the calculations so i'm not sure how i'd get the data back in.
Does anyone know what is the best way to go about this?
Thanks
afk
Solved! Go to Solution.
If you use Formula In-DB with SQL Server, this will work.
ISNULL([Field], 0)
If it's Oracle:
NVL([Field], 0)
If it's MySQL
IFNULL([Field], 0)
Cheers,
Hi @Thableaus
I'm using SQL Server.
Will I need to input the formula for all fields affected? The multi-field formula tool is quite handy as I could convert multiple fields at the same time.
Thanks
afk
There's no Multi-Field formula In-DB.
Are there many fields? Because the function is very short, you can use a single Formula In-DB tool and just paste the field names into the function.
Cheers,
Yeah, quite a few fields with possibility of more fields added in future. Data cleanse tool also allowed me to retain the column name without having to change it. (i actually meant data cleanse in an earlier response as opposed to multi-field formula).
Guess writing the formula would be my only solution for the moment.
Will give it a go, thank you!
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |