|
Dears, Can you please help on REMOVING LAST CHAR from 4 decimal value, WITHOUT ROUNDING decimal value?
(comments are locked)
|
|
It would be easier to give you the right answer if we had an example to work with, but the truncate function of the round function may give you what you need: The third argument of the ROUND function allows you to specify that the rounding should be done by truncation rather than 'normal' rounding, so you can use this to truncate the value to a decimal with 3 decimal places, and then re-cast that, otherwise the ROUND function returns the same scale as the value passed in. Kev, Great solution..just without last digit, while I have all records with 4 decimals, I got a simple solution, LEFT(@Field,CHARINDEX('.',@Field)+3) Thank you very much for your effort.
May 21 '12 at 10:27 AM
Gogolo
(comments are locked)
|
|
The method depends on the source data type. Some will round others will truncate. You seems to be looking for a method that truncates.
(comments are locked)
|


can you give us a sample of the source data and how you want the target data to look like?