SELECT t.name,
t.ID_VE,
t.id_veranst,
t.art,
t.raum_bez,
t.pv,
t.Datum,
t.von,
t.bis
FROM (
SELECT ROW_NUMBER() OVER ( PARTITION BY tbl_belegung.B_ID
ORDER BY isnull(replace(tbl_persstamm.titel + ' ', '', ''), '') + [tbl_persstamm].[vn] + ' ' + [tbl_persstamm].[nn] ) AS zeile,
tbl_veranst.name,
tbl_veranst.ID_VE,
tbl_veranst.id_veranst,
tbl_format.art,
tbl_veranst_ort.raum_bez,
tbl_belegung.Datum,
tbl_belegung.von,
tbl_belegung.bis,
isnull(replace(tbl_persstamm.titel + ' ', '', ''), '') + [tbl_persstamm].[vn] + ' ' + [tbl_persstamm].[nn] AS pv
FROM tbl_veranst
INNER JOIN tbl_belegung
ON tbl_veranst.ID_VE = tbl_belegung.ID_VE
INNER JOIN tbl_format
ON tbl_veranst.ID_VA = tbl_format.ID_VA
INNER JOIN tbl_veranst_ort
ON tbl_belegung.VO_ID = tbl_veranst_ort.VO_ID
INNER JOIN (tbl_persstamm INNER JOIN tbl_veranst_pv ON tbl_persstamm.pid = tbl_veranst_pv.P_ID) ON tbl_veranst.ID_VE = tbl_veranst_pv.V_ID
WHERE(tbl_veranst_ort.gebauede='Campus' AND tbl_veranst.status = 1)
) t
WHERE t.zeile = 1