MS SQL T-SQL: Rows to Columns
Budget: $10 – $30 USD
I've uploaded some basic data. It has 2 columns. Column 1 is a Publication Index and column 2 is an authors name. I need a T-SQL query that will create a pivot table that will put the authors names into columns and the PMID's into rows. The xls sheet has the data and the output that I need. I'm posting the question here because I need a faster answer than posting on StackOverFlow. The data will have over 8,000 rows of data and the columns or names will be over 100.
My current T-SQL is
SELECT TOP (100) PERCENT PMID, AuthoringName
FROM dbo.[Publication.Members.Pubs]
GROUP BY PMID, AuthoringName
ORDER BY PMID, AuthoringName
I'm using MS SQL 2019
My current T-SQL is
SELECT TOP (100) PERCENT PMID, AuthoringName
FROM dbo.[Publication.Members.Pubs]
GROUP BY PMID, AuthoringName
ORDER BY PMID, AuthoringName
I'm using MS SQL 2019