• Without sample data and expected results, I'm only taking a shot in the dark.

    You should really read and understand the articles mentioned by Sean as there's some sample code in them.

    I can't test my solution but it might give you an idea. Even if it worked, you must complete it.

    WITH CTE as(

    SELECT top(5)

    ap.apptDte,

    ap.begTime,

    lc.locName,

    ev.event,

    pm.fname + ' ' + pm.lname AS name,

    ROW_NUMBER() OVER( ORDER BY( SELECT NULL)) rn

    FROM

    appts ap

    join loc_mstr lc on lc.locID = ap.locID

    join events ev on ev.eventID = ap.eventID

    join prov_mstr pm on pm.provID = ap.rend_provID

    WHERE

    personID = '5D06AAE9-1B8D-461B-BAAB-633C1ED7ED43'

    AND appt_date > GETDATE())

    SELECT MAX( CASE WHEN rn = 1 THEN apptDte END),

    MAX( CASE WHEN rn = 1 THEN begTime END),

    MAX( CASE WHEN rn = 1 THEN locName END),

    MAX( CASE WHEN rn = 1 THEN event END),

    MAX( CASE WHEN rn = 1 THEN name END),

    MAX( CASE WHEN rn = 2 THEN apptDte END),

    MAX( CASE WHEN rn = 2 THEN begTime END),

    MAX( CASE WHEN rn = 2 THEN locName END),

    MAX( CASE WHEN rn = 2 THEN event END),

    MAX( CASE WHEN rn = 2 THEN name END)

    --And so on

    FROM CTE

    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