SQL server - Pivot only on a part of the result
问题 I need to put columns in rows only for the last columns of my query's results. The query is : select dpp.CODE_PORTEFEUILLE, dpr.SOCIETE_GESTION, lgp.CODE_GERANT, lgp.DEVISE_GERANT, lgp.CODE_INTERVENANT from GP3DBA.DESCRIPTIF_PORTEFEUILLE dpp join GP3DBA.DESCRIPTIF_PORT_REPORTING dpr on dpp.CODE_PORTEFEUILLE = dpr.CODE_PORTEFEUILLE join GP3DBA.LIEN_GERANT_PORTEFEUILLE lgp on dpp.CODE_PORTEFEUILLE = lgp.CODE_PORTEFEUILLE RESULT: DESIRED RESULT: I have tried to do it myself, but without any