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 |
|
jn-at-uk
Starting Member
20 Posts |
Posted - 2005-05-18 : 05:11:25
|
| hi,I get the "Arithmetic overflow error converting numeric to data type numeric."when i do the followingdeclare @NConv int, @PConv decimal(2,2),@pVisit intselect @NConv = 10select @PVisit = 587select @PConv = convert(decimal(18,2),((1.0*@NConv/@PVisit) * 100))@PConv = errorbut if @NConv = 3 i get .51 which is correct.How do i get an answer of |
|
|
jn-at-uk
Starting Member
20 Posts |
Posted - 2005-05-18 : 05:16:41
|
| problem resolved i needed to declare @PConv decimal(4,2) instead of (2,2) |
 |
|
|
|
|
|