Jun 14, 2001 #1 khue Programmer Mar 6, 2001 112 US When I create a field of type money, how do I set this field to be only 2 decimal point precision? i.e. 9999.99
When I create a field of type money, how do I set this field to be only 2 decimal point precision? i.e. 9999.99
Jun 14, 2001 #2 foxdev Programmer Feb 11, 2000 1,995 US You can't; money and smallmoney inherently support four digits of decimal precision. You can toy with Convert() to convert it for display, though. Robert Bradley Sr. DBA, some big company cheap prints and oil paintings: http://www.lowcostprints.com Upvote 0 Downvote
You can't; money and smallmoney inherently support four digits of decimal precision. You can toy with Convert() to convert it for display, though. Robert Bradley Sr. DBA, some big company cheap prints and oil paintings: http://www.lowcostprints.com
Jun 14, 2001 Thread starter #3 khue Programmer Mar 6, 2001 112 US I have toy around with the Convert() but still get a 4 decimal place precisions. Is there any way around this? Upvote 0 Downvote
I have toy around with the Convert() but still get a 4 decimal place precisions. Is there any way around this?
Jun 14, 2001 #4 foxdev Programmer Feb 11, 2000 1,995 US Try using the style of 1, as in this example: [tt]declare @MyMoney smallmoney select @MyMoney = $123.45 select convert(char(15), @MyMoney, 1)[/tt] Robert Bradley Sr. DBA, some big company cheap prints and oil paintings: http://www.lowcostprints.com Upvote 0 Downvote
Try using the style of 1, as in this example: [tt]declare @MyMoney smallmoney select @MyMoney = $123.45 select convert(char(15), @MyMoney, 1)[/tt] Robert Bradley Sr. DBA, some big company cheap prints and oil paintings: http://www.lowcostprints.com