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
Append a query string to destination URL after redirect?
Outlook 2007 freezes forwarding email
Cannot access Windows 2008 DFS links from Windows 2003
How to get lightbox to show over Flash banner?
Visio 2007 - Adding Connector Drag points
Javascript to get <TD> inner text in MSIE, FF and Chrome
Whats the difference? $var and $_var
How can you search e-mail within Outlook 2010 and not use the index?
Backup on Hyper-V Cluster
Roaming Profiles in Windows 7 Pro and SBS 2008