For our customers that use SAPB1 with HanaDB we execute the same query to pull data out (using the ADO.NET interface). Some have their regional system systems that appear to control numerical formatting according to their locale, etc.
Say for example when executing: SELECT RDR1."Quantity" FROM RDR1
- For a customer in the USA, RDR1."Quantity" = 2.000000
- For a customer in Germany, RDR1."Quantity" = 2,000000 (notice the comma vs decimal)
I assume the actual database storage of the value is the same, it is just the query engine that is applying default system formatting based on the settings that makes the end result formatted one way or another.
Now, using a brute force approach and per column this type of change can be made:
REPLACE(CAST(ROUND(RDR1."Quantity",2) AS DECIMAL(10,2)), ',', '.') AS "Quantity”
to give me "2.00"
However we have many columns like this and we want to make the code usable in all cases vs having multiple instances of the same queries for different regions -- and it just seems there should be a way to tell the query engine to return values as if it were in the USA and ignore default system locale and currency settings.
Question: Is it possible to make a high level setting change instead of per column formatting/casting - either using Hana SQL query code (like a session variable or something) or a connection setting when we establish the ADO.NET connection to HanaDB that will just make the values come out as if they were in the USA?
I haven't found any yet but perhaps it is not so easily found in the documentation how to handle it.