表:
student kemu scores
001 chinese 85
001 maths 91
001 english 85
001 geography 58
002 chinese 78
002 maths 85
現我用pivot語句產生交叉表:
select * from 表 PIVOT (sum(scores)
for kemu in ([chinese],[maths],[english],[geography]))as pvt
出現下列語法錯誤:
訊息 170,層級 15,狀態 1,行 1
行 1: '(' 附近的語法不正確。
請高手指導!
student kemu scores
001 chinese 85
001 maths 91
001 english 85
001 geography 58
002 chinese 78
002 maths 85
現我用pivot語句產生交叉表:
select * from 表 PIVOT (sum(scores)
for kemu in ([chinese],[maths],[english],[geography]))as pvt
出現下列語法錯誤:
訊息 170,層級 15,狀態 1,行 1
行 1: '(' 附近的語法不正確。
請高手指導!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货