Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to show null values as zero by script?
Ex: If COMM=NULL then 0 else COMM
Hi,
Try:
if(isnull(Comm),0,comm) as fieldname
HTH
Sushil
Hi,
Try this code
If(IsNull(COMM),0,COMM)
Regards,
Vivek
Hi,
You can try with
Load
If(Len(Trim(COMM))=0,0,COMM) as CommField
FRom Source;
And also
Load
If( Isnull(COMM)=-1,0,COMM) as CommField
FRom Source;
Regards
Anand
you can also use
this command
NullAsValue COMM;
Set NullValue =0 ;
your table load
and then
NullAsNull
Not working any of the code.
Hi,
Have u tried:
IF(COMM = 'NULL',0,COMM) as FieldName
HTH
Sushil
Thank you all.
Dear JJR,
Convert null values to 0 using simple expression,
=Alt(FieldName, '',0)
Kind regards,
Ishfaque Ahmed
Hi,
It seems you have to convert 0 to NULL if so assume this example
New:
LOAD COMM,ID,If(Trim(COMM)=0,'NULL',COMM) AS FilterField;
LOAD * Inline [
COMM,ID
NULL,1
NULL,2
NULL,3
0,4
300,5
500,7
1400,7 ];
Regards
Anand