select * from AttendanceInfo pivot(max(AttendanceID) for cast(FaceTime as nvarchar(30)) in( [FirstTime],[LastTime]))a好像报错 “(”有错误,
cast(FaceTime as nvarchar(30)) 这里必须是列名称;具体语法查看
http://www.cnblogs.com/maanshancss/archive/2013/03/13/2957108.html