I'm trying to get a SELECT statement in the following general form to work:

SELECT CASE WHEN <condition> THEN <calculation> ELSE <calculation> END AS CalcA, sum(CalcA) AS CalcATotal ....

I get an error "no such column" referring to CalcA when used in the sum function. I'm trying to get total of all the values of CalcA across all the selected rows. Is there a way to do this?

Pete Haworth







http://www.mollysrevenge.com
http://www.sonicbids.com/MollysRevenge
http://www.myspace.com/mollysrevengeband








_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to