Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Datatype change from NVARCHAR to decimal

$
0
0

Hello Sumeet,

 

I assume, you have replicated your ECC table using SLT.

 

You can add a calculated column to your table via an ALTER TABLE statement (e.g. ALTER TABLE "<your table>" ADD ("<calculated_column_name> decimal(6,0) GENERATED ALWAYS AS ("<your_original_column>");).

This supplies the new calculated column for every insert or update (in case you have already data in your table, just do a simple update of each row). Of course only if you have values in your original column which can be converted.

But consider, that a calculated column is materialized and you have a little overhead for each insert/update.

 

Did you think about the creation of a simple calculation view using a projection with a calculated column to convert the value to a decimal value? This would avoid that you need additional storage for the decimal value on the db.

 

Best regards,

Florian


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>