I’m creating an ssrs report and creating a mockdata sql script. In the script I want to insert a decimal value like so: The values after “someString” are actually one decimal value with a comma as decimal separator. SQL interprets this as separate values though and hence throws an error about too many values for the number of columns. How
Tag: decimal
In a currency exchange rate what is the maximum number of decimal places used?
I need to store currency exchange rate data in the SQL 2008 database. I would like to keep rate as a decimal data type in the database. One thing I am not sure about, is how many decimal places to give (e.g. decimal(18, ?)). Since, I will be using this service as a source: http://openexchangerates.org/latest.json. There, it seems that the
Remove trailing zeros from decimal in SQL Server
I have a column DECIMAL(9,6) i.e. it supports values like 999,123456. But when I insert data like 123,4567 it becomes 123,456700 How to remove those zeros? Answer A decimal(9,6) stores 6 digits on the right side of the comma. Whether to display trailing zeroes or not is a formatting decision, usually implemented on the client side. But since SSMS formats