Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to convert the Null values as Zero in the Qvd Generator file
May be like this:
If(Len(Trim(FieldName)) = 0, 0, FieldName) as FieldName
Or this:
Alt(FieldName, 0) as FieldName
If(IsNull(FieldName) or Len(Trim(FieldName))=0,0,FieldName) as FieldName
if i go in this way i shd do for all fileds, i wan to do for all fileds in one single shot, any idea?
Use NullAsValue function.
Look at the sample:
NullAsValue *;
SET NullValue = 0;
Table:
LOAD If(Len(Trim(Val1)) > 0, Val1) as Val1,
If(Len(Trim(Val2)) > 0, Val2) as Val2,
If(Len(Trim(Val3)) > 0, Val3) as Val3;
LOAD * Inline [
Val1, Val2, Val3
3, , 4
2, 4,
, 2, 4
];
try this one
Alt(FieldName, 0) as FieldName
or try in this way
if(fieldname=null, 0)
Temp
LOAD Emp name,
Emp ID,
Desg;
SQL SELECT *
FROM emp;
this is my example code now where shd use this null function, any idea