cancel
Showing results for 
Search instead for 
Did you mean: 

Can NVARCHAR be null?

chr_br
Explorer
0 Kudos

Hello all,

I stumbled today that a Calculated Column in a Calculation View wants to convert a null value return to integer.

Can someone explain this to me?

Example: If I define a field as NVARCHAR and determine the field contents via if statement, in some cases a null value should be returned and not an empty string or similar.

However, the activation fails because there is a data type conversion problem. HANA wants to convert NULL to an integer and the Calculated Column is defined as NVARCHAR.

How to understand this? Null represents the absence of a value, so how can it be an integer?

KonradZaleski
Active Contributor

Can you provide your column definition plus screen from the calculated column?

Accepted Solutions (1)

Accepted Solutions (1)

chr_br
Explorer
0 Kudos

I solved the problem by converting NULL to string.

So the code in calculated column looks like:

if("..." = '01', "...", string(Null))

Answers (0)