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

Decimal Points are truncated in Scripted Calculation View

$
0
0

Hi,

I am totally stumped here and need some help!

I have a scripted calculation view which has exactly same logic as a graphical calculation view.

 

I’m trying to compare the result sets from the two views to make sure that they are indeed doing the same thing.

And here is what is happening. 

    When I compare the records counts, they return the same counts.

    When I look at individual records which I looked at quite a few records, they are exactly the same.

 

But when I try to compare in masses, the scripted view seems to truncate the decimal points, so it returns records when looking for differences.

 

However, when I take the ”Union ALL” out and just run the first select statement, or only compare a specific record, it does not truncate the decimal points.

 

I made sure that all the data types are same (they are DECIMAL(13,3)), and try to type cast all the fields, try to use Round functions and nothing seems to work. 

 

Importantly, it is not UNION ALL that is causing the issue, when I UNION ALL with some other set of tables, it works fine.

 

I included the SQL script and results set as attachment.

 

Thank you for your help.

 

Hyun


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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