this is my query
SELECT max(rev_no), max(tour), max(DT), max(SHIFT_NO), max(DECODE(STA,1,RD,NULL)) "MW PR",
max(DECODE(STA,2,RD,NULL)) "MW",
max(DECODE(STA,3,RD,NULL)) "MW D",
max(DECODE(STA,10,RD,NULL)) "P2300-4 PR",
max(DECODE(STA,11,RD,NULL)) "P2300-4",
max(DECODE(STA,12,RD,NULL)) "P2300-4 D"
FROM history WHERE tour=18 AND rev_no=1 AND RD IS NOT NULL AND DT={?SelectDate} GROUP BY SHIFT_NO ORDER BY SHIFT_NO
now i want to total of the column "MW D" the datatype of RD is varchar2 but there is number in it as its value. how can i add that column?
Thanks
SELECT max(rev_no), max(tour), max(DT), max(SHIFT_NO), max(DECODE(STA,1,RD,NULL)) "MW PR",
max(DECODE(STA,2,RD,NULL)) "MW",
max(DECODE(STA,3,RD,NULL)) "MW D",
max(DECODE(STA,10,RD,NULL)) "P2300-4 PR",
max(DECODE(STA,11,RD,NULL)) "P2300-4",
max(DECODE(STA,12,RD,NULL)) "P2300-4 D"
FROM history WHERE tour=18 AND rev_no=1 AND RD IS NOT NULL AND DT={?SelectDate} GROUP BY SHIFT_NO ORDER BY SHIFT_NO
now i want to total of the column "MW D" the datatype of RD is varchar2 but there is number in it as its value. how can i add that column?
Thanks