On Sat, 14 Nov 2009 21:45:09 +0100, Kees Nuyt
wrote:
> [-- sql with errors snipped --]
Make that:
SELECT 'detail' AS Descr,
CASE
WHEN THEN
ELSE
END AS CalcA
FROM yourtable
UNION
SELECT 'total' AS Descr sum(
CASE
On Sat, 14 Nov 2009 11:58:42 -0800, Peter Haworth
wrote:
>I'm trying to get a SELECT statement in the following general form to
>work:
>
>SELECT CASE WHEN THEN ELSE
>END AS CalcA, sum(CalcA) AS CalcATotal
>
>I get an error "no such column" referring to CalcA when used in the
>sum f
On Sat, Nov 14, 2009 at 1:58 PM, Peter Haworth wrote:
> I'm trying to get a SELECT statement in the following general form to work:
>
> SELECT CASE WHEN THEN ELSE END AS
> CalcA, sum(CalcA) AS CalcATotal
>
> I get an error "no such column" referring to CalcA when used in the sum
> functio
I'm trying to get a SELECT statement in the following general form to
work:
SELECT CASE WHEN THEN ELSE
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
ac
4 matches
Mail list logo