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.
| Author |
Topic |
|
thiyait
Yak Posting Veteran
70 Posts |
Posted - 2005-01-13 : 09:09:30
|
| Hi All:This is my query:select 4567.0000I need the result like this:4567.00Is there any format function in sqlserver to achieve the result?thanksthiya |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-01-13 : 09:13:55
|
| It's really a format issue and should be handled by the front end application. Having said that, here you go:DECLARE @number DECIMAL(8,4)SELECT @number = 4567.0000SELECT CAST(@number AS DECIMAL(6,2))MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|