Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How do I limit decimal points in computed column?

Author  Topic 

Lesnet
Starting Member

2 Posts

Posted - 2007-08-31 : 09:55:34
How do I limit the decimal points in a computed column. SSE 2005 seems to override the precision and scale I set in either GUI or by creating the table by query.

Thanks in advance for helping.

Scott

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-31 : 09:58:50
use convert() function to convert to the desired precision and scale


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-08-31 : 09:58:52
... AS CAST(.... AS DECIMAL(5, 2))



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -