Incorrect syntax near 'PIVOT'

后端 未结 3 565
情歌与酒
情歌与酒 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:03

    i faced the same problem... while using "Pivot" and "Format" and "Convert" command inside sql query.

    one thing that worked for me was instead of importing sqlite i imported pyodbc so my code changed

    from : import sqlite3 conn = sqlite3.connect('/Users/****/Desktop/****.sqlite')

    to: import pyodbc conn = pyodbc.connect('Driver={SQL Server};''Server=@@@@;''Database=****;' 'Trusted_Connection=yes;')

提交回复
热议问题