Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey folks,
I have the code below trying to set 0 for input integer row where the value is null but I still have null value on output. Any help is much appreciated.
Marvel_TV.Cartoonshows ==null||Marvel_TV.Cartoonshows .equals("")?null:new Integer(Marvel_TV.Cartoonshows)
Cheers,
Neil.
your logic translated to plain english look like:
- if any of 2 (Marvel_TV.Cartoonshows==null or |Marvel_TV.Cartoonshows is empty) - use null, if no one of them - use new Integer(Marvel_TV.Cartoonshows)
is this logic correct or you must change it?
like
Marvel_TV.Cartoonshows==null||Marvel_TV.Cartoonshows .equals("")?0:new Integer(Marvel_TV.Cartoonshows)
your logic translated to plain english look like:
- if any of 2 (Marvel_TV.Cartoonshows==null or |Marvel_TV.Cartoonshows is empty) - use null, if no one of them - use new Integer(Marvel_TV.Cartoonshows)
is this logic correct or you must change it?
like
Marvel_TV.Cartoonshows==null||Marvel_TV.Cartoonshows .equals("")?0:new Integer(Marvel_TV.Cartoonshows)
Thats perfect thanks again your help is much appreciated!