1

如何插入sql pivot table常规sql表?

我有一个数据透视查询

SELECT country,
       PARTNER_ID,
       PARTNER_NAME,
       [BCS] AS BCS,
       [HPN] AS HPN,
       [ISS] AS ISS,
       [HPSD] AS HPSD
FROM   (
           SELECT COUNTRY,
                  PARTNER_ID,
                  PARTNER_NAME,
                  BU,
                  FUNDING
           FROM   ESSN_DP_CALCULATION
       ) p
       PIVOT(AVG(FUNDING)FOR BU IN ([BCS], [ISS], [HPN], [HPSD])) AS pvt 

哪个工作正常,但我需要帮助才能将这些值插入到FINAL 具有相同列的名为的表中 -country, PARTNER_ID,PARTNER_NAME, BCS, HPN ,ISS, HPSD

4

0 回答 0