I'm trying to make a query where multiple contacts (stored in the same table) can be generated as
Contacts.strSurname AS [Person 1],
Contacts.strSurname AS [Person 2],
Contacts.strSurname AS [Person 3] etc
and be output in the same row.
I have already offered the below solution but I need to make all these contacts be in the same row
Table.TablePK AS Unique,
CONCAT('person No: ', ROW_NUMBER() OVER (PARTITION BY Table.TablePK
ORDER BY Contacts.strSurname) + 0) AS [Person No]
Any help would be greatly appreciated as any solution it try I can't get to work