About EasyMorph Tutorials & Examples Web-help

How to generate column with NULL

Dear all,

as I`m trying to reach the destination format (table on a MSSQL-Server) already in EasyMorph and because in the destination table there is a column with NULL-Values:

How do I achive a column with NULL as only values?

Best regards,
Patrick

Hello Patrick,

you can simply use no expression when calculating a column. See below

If you need to generate an empty value explicitly in some cases (e.g. on condition), you can also use the empty() function.

1 Like

Hi Dmitry,

thanks.

Just for clarification (as we all know “empty value” normally is not the same as NULL :crazy_face:):

This means that NULL is achived by leaving the cell empty in EasyMorph.
On the contrary if I need an empty string in the destination format I will need to specify “” for an empty string value in EasyMorph.

Have I got it right?

BR,
Patrick

Yes, that’s correct.

empty() or no expression returns empty value (similar to NULL).

'' or "" returns a zero-length text string.

Note that in expressions the equality operator returns TRUE for the following condition:

empty() = ''

In expressions, an only in expressions, empty values are equal to zero-length text strings. If you’re not sure if a cell is an empty value or a zero-length text string, the best way to figure it out is to right-click the cell and select “Metadata” to open the Cell Profiler.

image

Also, cells with empty values have a slightly darker background, but it may be hard to notice on some displays.

Finally, keep in mind that an empty value is not the same as NULL in SQL. For instance, they can be used in comparison or matching:

empty() = empty() // TRUE
1 Like
To learn more about EasyMorph visit easymorph.com.