Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sszzxx
Contributor III
Contributor III

null and zero handling for double

Hi All,

 

I am trying to do a null handling for a double type column and was given error...

 

(row1.APPRVD_AMT IS NOT NULL AND row1.APPRVD_AMT<>0)

 

Can anyone pls assist on how do I convert double to where the value consist of only non nulls and not 0.

Labels (2)
1 Solution

Accepted Solutions
vapukov
Creator III
Creator III

Hi!

 

it is work for Double, but not work for double 🙂

 

you could attach your design 

 

in case of double, you could define the column as not null and assign a default value to it (as variant)

View solution in original post

3 Replies
vapukov
Creator III
Creator III

Hi,

 

Talend developed on Java and use Java for routines, not SQL. 

so proper syntax could be

row1.APPRVD_AMT!=null&&row1.APPRVD_AMT!=0

or

Relational.isNull(row1.APPRVD_AMT)==0&&row1.APPRVD_AMT!=0

regards, Vlad

sszzxx
Contributor III
Contributor III
Author

hi Vapukov,

 

Thanks for the reply.

 

I have tried putting it as you have listed but however I received this error message as I tried to build the job:

 

the operator !=is undefined for the argument type(s) double,null.

 

I forgot to point out that my datatype is double for this case ... do I have to cast it to string first before i use the statement you have assist in providing to me for?

vapukov
Creator III
Creator III

Hi!

 

it is work for Double, but not work for double 🙂

 

you could attach your design 

 

in case of double, you could define the column as not null and assign a default value to it (as variant)