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 |
usafelix
Posting Yak Master
165 Posts |
Posted - 2015-01-27 : 21:34:55
|
case when trx_acc_amt<1000 then trx_acc_amt/nullif((Sum( case when salesman_code is null or salesman_code=' ' then 0 else 1 end + case when salesman_code2 is null or salesman_code2=' ' then 0 else 1 end + case when salesman_code3 is null or salesman_code3=' ' then 0 else 1 end + case when salesman_code4 is null or salesman_code4=' ' then 0 else 1 end + case when salesman_code5 is null or salesman_code5=' ' then 0 else 1 end + case when salesman_code6 is null or salesman_code6=' ' then 0 else 1 end)),0) else trx_acc_amt / 2 end as bonus,--------- error in this column convert(varchar, convert(decimal(5,2), 100.0 * (trx_acc_amt)/(bonus)))+'%' as percentofFrom test_table |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-27 : 21:41:51
|
it looks like you have posted the same question four or five times in this forum today. Please don't do that. it makes people less likely to help you. |
|
|
|
|
|