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 |
|
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2009-04-15 : 10:40:32
|
| The value is not correct when I multiply itOrderDetail.Subtotal * .15 AS payout81.5100 * .15 = 12.000000It should be 12.2265 (12.23)SELECT models.merchantAccountNo, OrderDetail.Subtotal + Orders.ShippingCost AS total, Orders.OrderID, models.modelID, '' AS description, OrderDetail.Subtotal * .15 AS payoutFROM Orders INNER JOIN OrderDetail ON Orders.OrderID = OrderDetail.OrderID INNER JOIN PSet ON OrderDetail.pantiesSetID = PSet.pantiesSetID INNER JOIN models ON PSet.modelID = models.modelIDWHERE (Orders.isPayed = 0) AND (Orders.Canceled = 0)DaveHelixpoint Web Developmenthttp://www.helixpoint.com |
|
|
karthik_padbanaban
Constraint Violating Yak Guru
263 Posts |
Posted - 2009-04-15 : 10:55:42
|
| check this its working fine for me.declare @a table (id int, mon money)insert into @a select 1,81.5100select mon *.15 as payout from @aresult 12.226500Karthik |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-15 : 13:59:47
|
| are you sure the datatype of field OrderDetail.Subtotal is money though it stores money values? |
 |
|
|
|
|
|