• I'm sorry I didn't replied yesterday but we had to leave the office because of Isaac.

    Here's a query that will work as a static report. It can be easily transformed to a dynamic query to allow more certifications.

    SELECT location,

    MAX( CASE WHEN cert = 'cert1' THEN certdate END) AS cert1,

    MAX( CASE WHEN cert = 'cert2' THEN certdate END) AS cert2,

    MAX( CASE WHEN cert = 'cert3' THEN certdate END) AS cert3,

    MAX( CASE WHEN cert = 'cert4' THEN certdate END) AS cert4

    FROM#table1 t1

    JOIN#table2 t2 ON t1.conid = t2.conid

    GROUP BY t1.location

    PS. I can't stop laughing at all the nonesense from the previous poster. Certificates with a location column? Seriously?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2