Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marksmunich
Creator III
Creator III

displaying the null values or values with '-' symbol as others. how to create a new field.

in my database some values are null and some are represented by symbol - . i would like to display them as others. how to create a field in the script for this.

T&R

Mark

6 Replies
Not applicable

if(field=' ' or field='-',field ) as others

Not applicable

if(fieldname=' ' or  fieldname = '-','Others') as Nullfield

er_mohit
Master II
Master II

Try this one also

if(wildmatch(Fieldname,' ','-'),'Others') as NewField

Update As per your question

if(Fieldname=wildmatch(Fieldname,' ','-'),'Others',Fieldname) as yourFieldname

hope it helps

prodanov
Partner - Creator
Partner - Creator

You can use this:

if(isnull(<field>),'Others',<field>) as NewField

or

this if you want to change more than one field.

NullAsValue A,B;

Set NullValue = 'Others' ;

Load A,B from x.csv;

marksmunich
Creator III
Creator III
Author

Sorry there is a small change, i dont want to create a new field instead i wanted to fill the empty fields with word 'other'

prodanov
Partner - Creator
Partner - Creator

If this field is dimension you can use same script to old field. But if this is a amount you change to 0, not to "Other"