John,
select distinct class ;
from code ;
into array laClasses ;
order by class
This will give you a list of the classes there are to process.
>Thank you. You're code works if I need to build it once or number of and names of the classes remain constant. But I need to dynamically generate these. Number and name of the classes can change anytime in which case I need to regenerate these codes. IOW, I need something more generic.