Ben Hamilton

Using a ternary expression to check if a value is null

Simple test to see if a field is null. I’m using this in Talend to determine if I copy the value into a new note field. You could use a length test, but if the field is a date, then you need to do it this way.

row1.field1 != null ? do_this_if_true : do_this_if_false

This entry was posted in How to and tagged , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks are currently closed.