cancel
Showing results for 
Search instead for 
Did you mean: 

Nvarchar to Int Conversion

0 Kudos

Hi Can some one help me to "How to convert NVARCHAR datatype column in to INT format" using calculated column in Calculation view.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Thank You Florian...Now Understand functionality clearly.

pfefferf
Active Contributor
0 Kudos

If you have only integer values in the nvarchar typed column, you can use the "int" conversion function (Conversion Functions - SAP HANA Modeling Guide for SAP HANA Web Workbench - SAP Library).

This function will fail if a value should be processed which is not a real integer (e.g. "abc", "1.1", "2,2").

If you have also double-like nvarchars in your column like e.g. "1.1" you can combine your expression with the "double" function (-> int(double("COL_NAME"))).

There are several more options, but it always depends in which format your data is available in the nvarchar column.

For more information you have to refine your question with more details or have a look to the available conversion functions.

Regards,

Florian