Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi Team,
i wanted to compare two date columns coming from two tables
i used TalendDate.compareDate(date1,date2) != 0 as it is returning an integer value this is not expected result
getting null pointer exception in tmap, please help on it.
Regards,
Meena
Yes @rhall,that condition wil work as expected and i have designed the job based on that condition and shared with him.
That's great, but we clearly do not know what the problem is. The information supplied has not been sufficient to identify whether the date comparison has been a red herring or not. My suspicion is that the output filter logic is flawed. But this can only be identified if we get the information.
Thanks for your inputs my issue has been fixed, i am very thankful to you for giving me prompt response
row1.date1 == null && row2.date2 == null ? false :
(
row1.date1!= null && row2.date2!= null ?
(
TalendDate.compareDate(row1.date1,row2.date2)==0? false: true)
:true), i used this condition in tmap
This fixed my issue i compared with nulls too.
once again Thank you all
Regards,
Meena
All you need is this....
TalendDate.compareDate(row1.date1,row2.date2)==0? false : true
....this is redundant....
row1.date1 == null && row2.date2 == null ? false : ( row1.date1!= null && row2.date2!= null ?