
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Changing null
Hey,
How do I go about changing Null values in my table to zero or 1?
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you mean a database table, you can use the statement:
set NullDisplay='0';
in your script to replace all NULL values with 0.
If you mean in a pivot or straight table, you can set the Null Symbol value on the Presentation tab of the Properties dialog.
-Phil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to specify it to one column in a table and not the others?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this ,
=if(Columnname = '' , 1, Columnname)
Hope it helps
Please close the thread by marking correct answer & give likes if you like the post.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If it is a database load, you may have to use:
If(isnull(Columnname),1,Columnname) as Columnname
-Phil


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This one would work
IF(IsNull(Field) OR Len(Field)>0,0,Field)
Hope this help.
Regards,
Sokkorn

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
If you want to do it in backend then ,
before the starting of the script you need to write:
to set null value as 1
NULLASVALUE *;
SET NullValue =1;
Similarly you can do to set null values as 0.
I Hope this will solve your purpose.
Pratibha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It loads but does not change because the NULL values that I have are in that column but in a different table. I went to the presentation tab on the table box and could not find the options.
I have three options in the column on the new table. No, Yes, and NULL.
I need to change the No to a 1, the Yes to a 0, and the NULL to a 0.
The No and Yes are in the original load, the NULL happens when I put this column into a different table after its loaded in. The new table is a table box.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It loads but does not change because the NULL values that I have are in that column but in a different table. I went to the presentation tab on the table box and could not find the options.
I have three options in the column on the new table. No, Yes, and NULL.
I need to change the No to a 1, the Yes to a 0, and the NULL to a 0.
The No and Yes are in the original load, the NULL happens when I put this column into a different table after its loaded in and compared to my key. The new table is a table box.
