摘要: DECLARE @SQL VARCHAR(8000)SET @SQL = 'select overcode 'SELECT @SQL = @SQL + ' , max(case header when ''' + header + ''' then 1 else 0 end) [' + header + ']'FROM (SELECT DISTINCT header FROM overtime_detail) AS aSET @SQL = @SQL + ' from overtime_det 阅读全文
posted @ 2013-11-04 19:57 Mark1997 阅读(363) 评论(0) 推荐(0) 编辑