This is what I have:
select piecedesc,pieceid,county,litcode,litcode2,litcode3,phonecnt,nophonecnt,totalcnt, cnt(*) as qty from AgeinOutput ;
group by piecedesc,pieceid,county,litcode,litcode2,litcode3,phonecnt,nophonecnt,totalcnt into cursor mike
What I need is a report with all those fields, but I need Phonecnt to show the total for all records by that field, and the same for nophonecnt & totalcnt.
This is the data:
LITCODE PHONECNT NOPHONECNT TOTALCNT
LIT1 1 0 1
LIT1 1 0 1
LIT1 0 1 1
LIT2 0 1 1
LIT2 0 1 1
So this what I need the select to show:
LITCODE PHONECNT NOPHONECNT TOTALCNT
LIT1 2 1 3
LIT2 0 2 2
Confused?
Thanks in advance,
Mike
select piecedesc,pieceid,county,litcode,litcode2,litcode3,phonecnt,nophonecnt,totalcnt, cnt(*) as qty from AgeinOutput ;
group by piecedesc,pieceid,county,litcode,litcode2,litcode3,phonecnt,nophonecnt,totalcnt into cursor mike
What I need is a report with all those fields, but I need Phonecnt to show the total for all records by that field, and the same for nophonecnt & totalcnt.
This is the data:
LITCODE PHONECNT NOPHONECNT TOTALCNT
LIT1 1 0 1
LIT1 1 0 1
LIT1 0 1 1
LIT2 0 1 1
LIT2 0 1 1
So this what I need the select to show:
LITCODE PHONECNT NOPHONECNT TOTALCNT
LIT1 2 1 3
LIT2 0 2 2
Confused?
Thanks in advance,
Mike