F
Faraz A. Qureshi
I have a crosstab query as follows:
TRANSFORM Sum(NwTbl.AMT) AS SUMAMOUNT
SELECT NwTbl.ACC, NwTbl.DT
FROM (SELECT DT, DR AS ACC, AMT, "CR" AS AMOUNT FROM TRANS
UNION ALL
SELECT DT, CR AS ACC, AMT, "DR" AS AMOUNT FROM TRANS) AS NwTbl
GROUP BY NwTbl.ACC, NwTbl.DT
ORDER BY NwTbl.ACC, NwTbl.DT
PIVOT NwTbl.AMOUNT;
How to give it a name so as to use it's calculated fields:
ACC
DT
DR
CR
in a SELECT Query as a single piece of Code, instead of saving it and using
the same in another query?
TRANSFORM Sum(NwTbl.AMT) AS SUMAMOUNT
SELECT NwTbl.ACC, NwTbl.DT
FROM (SELECT DT, DR AS ACC, AMT, "CR" AS AMOUNT FROM TRANS
UNION ALL
SELECT DT, CR AS ACC, AMT, "DR" AS AMOUNT FROM TRANS) AS NwTbl
GROUP BY NwTbl.ACC, NwTbl.DT
ORDER BY NwTbl.ACC, NwTbl.DT
PIVOT NwTbl.AMOUNT;
How to give it a name so as to use it's calculated fields:
ACC
DT
DR
CR
in a SELECT Query as a single piece of Code, instead of saving it and using
the same in another query?