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 |
|
JohnMcLaughlin
Starting Member
28 Posts |
Posted - 2011-01-28 : 09:36:48
|
| I am trying to compare 2 sets of data. One set has 4 decimal places, the other has 6. How can i change these figures to 3 decimal places so i am able to compare them. Thanks |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-01-28 : 09:37:47
|
| convert(decimal(18,3),fld)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
JohnMcLaughlin
Starting Member
28 Posts |
Posted - 2011-01-28 : 09:55:01
|
| Worked!! Cheers |
 |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2011-01-28 : 13:37:04
|
| ROUND() or CAST() -- don't use the old proprietary CONVERT().--CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
|
|
|