I need to make a document splitted, with the trx_status_id
when this is equal to 0 it mus be print

STATE:GOOD l_name, trx_status_id, Count(*)
.... ..... ......
.... ...... .......

Total Records: ???

When trx_status_id <> 0

STATE:NOGOOD (same as above)




Total Records: ?????


Please if anyone ccould help me on this i'll apreciate it a lot
am new programmin in SQR for AIX ,,Sybase