• Hi bitbucket-25253,

    Thanks for your help. Your sugegstion worked very well. All I had to do was alter the code to my requirements and hey presto, SUCCESS!

    Unfortunately a new challenge has arised. The table I am pulling the information from has duplicate distinct unit id numbers, for example.

    unit_id total

    1 155

    1 399

    I do not want to view both. The unit id numbers I want to view are also in another table I can pull from. I have messed around with a join but to no avail. The unit id number in the other table is actually called analysis_code1.

    Is there a way I can define the unit id I want?

    Thanks again,

    emmettjarlath