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 |
|
ranganaath
Starting Member
18 Posts |
Posted - 2011-01-28 : 15:11:32
|
| himy sql isselect a.vCBS,a.vBTLS,a.vCBS+(a.vBTLS/b.vNBPC) as TOTALCBS,b.vNBPC from dbo.tblTransaction a,tblItemMaster b where a.vitemcode=b.vitemcode and b.vNBPC>0 and a.vBTLS>0NBPC =no of bottles per caseif vBTLS=24 and vNBPC=48 the TOTALCBS is showing zeroranganath |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-01-28 : 15:14:15
|
| An integer divided by an integer is an integer, thus the 0.vCBS+(a.vBTLS*1.0/b.vNBPC) JimEveryday I learn something that somebody else already knew |
 |
|
|
ranganaath
Starting Member
18 Posts |
Posted - 2011-01-28 : 15:18:08
|
| Thank you very muchranganath |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|