RE: Numeric data from SQL Server getting truncated Martin Perrie 26.Sep.14 11:41 AM a Web browser Connector for OLE DB LC LSX - All ReleasesWindows
Thanks for your response, Daniel.
It is using the OLEDB connector. The data is pushed into a Notes number item. However, I can see the issue before that point. If I debug the script then, after the FETCH, the value of the LCFIELD shows only one decimal place.
This is occurring on a customer's server. I have also replicated the issue on my server.
I have found a workaround, though. In the SQL SELECT statement, if I CAST the column as numeric(15,3) i.e. allowing for 3 decimal places then it actually returns the value to two decimal places - which is the value I need.
I took this one step further and changed the definition of the column on the SQL table to numeric(15,3) and added a value to the 3rd decimal place of the data being returned. With the column still CAST as numeric(15,3) it only returns two decimal places. But once CAST as numeric(15,4) it returns three decimal places.
All very strange! I don't know what's going on given that it is absolutely fine, and works as expected, when the value is greater than 1.