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 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-12-05 : 09:51:05
|
| Not sure why null is returned where I can see in the table that there is indeed data.declare @tblData table(price decimal(12, 8), size decimal(12, 8))insert @tblData select 113.93000000, 2.00000000 union allselect 114.12500000, 2.00000000 union allselect 114.06300000, 2.00000000 union allselect NULL, NULL union allselect 114.06200000, 2.00000000 union allselect NULL, NULLselect sum(Size) from @tbldatawhere Price between 114.12500000 and 114.12500000 - 0.01WHEREAS this does return data but seems to be incorrectdeclare @tblData table(price decimal(12, 8), size decimal(12, 8))insert @tblData select 114.18000000, 2.00000000 union allselect NULL, NULL union allselect 114.18800000, 2.00000000 union allselect 114.18750000, 2.00000000 union allselect 114.18700000, 2.00000000 union allselect 114.18700000, 2.00000000select sum(Size) from @tbldatawhere Price between 114.18700000 and 114.18700000 + 0.01 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2007-12-05 : 09:59:02
|
| I see.Thanks again |
 |
|
|
|
|
|
|
|