I am trying to use the following syntax:
select machid,sum(iif(pvalue > 0,pvalue,0)) ,sum(iif(pvalue<0,pvalue,0)) from valuetable group by machid
esentiallly I have a table that has a field that I need to add all of the . values and all of the neg. values seperately to return two distinct calculations.
any ideas - query analyzer returns "Incorrect syntax near >."
Thanks in Advance
select machid,sum(iif(pvalue > 0,pvalue,0)) ,sum(iif(pvalue<0,pvalue,0)) from valuetable group by machid
esentiallly I have a table that has a field that I need to add all of the . values and all of the neg. values seperately to return two distinct calculations.
any ideas - query analyzer returns "Incorrect syntax near >."
Thanks in Advance