Incorrect syntax near 'PIVOT'

后端 未结 3 495
情歌与酒
情歌与酒 2021-01-19 00:23

I\'m running SQL Server 2008 R2. I\'m trying to build a table that takes data from a table structured like this:

company | ded_id | descr

10          1             


        
3条回答
  •  醉话见心
    2021-01-19 01:18

    The possible reason for that type of issue is you imported database from other source which might be running older version of SQL Server. Anyway, you have way to get out of it. Follow steps below:

    1. Right click on Database (e.g. Northwind).
    2. Click 'Properties'.
    3. Click 'Options', from left pane, under 'Select a page' section.
    4. Select appropriate database version as per your installation from drop-down of 'Compatibility level' at right.
    5. Save changes and try now.

    Below is screenshot of Properties window for your reference.

    enter image description here

提交回复
热议问题