Microsoft
Software
Hardware
Network
Question : SQL round decimal
In a large select stmt, on of the columns I am reading from contains a number (double). This column may contain a whole number, or may contain a decimal. Sometimes the decimal is very long.
I am looking to round the decimial to 4, but only when required. If the number is whole or less than 4 decimals I prefer it stay that way.
How would I do this?
I am quering against a DB2 database
Answer : SQL round decimal
Oh I see what you're asking. Does this work?
SELECT (ROUND(MyNumber*10000),0)/
10000
Random Solutions
jQuery or JS - Checkbox set/unset in an array?
Trend Micro Officescan 10.0 on Citrix XenApp Presentation Server 4.5 or 5.0
Logging computer off network
Preparing a AD to add MAC hardware
Crosstab Query To Excel - Number Format
Can't access shared folders and printers in Win 7 Pro in XP Home
Barracuda Load Balancer 340 - balances fine but real servers cannot connect to Interenet
Reading command line arguments in VB.Net
SharePoint list image link
Accessing an FTP server internally that is on a different subnet.