【发布时间】:2012-08-12 01:41:38
【问题描述】:
我的最终结果是将查询结果添加到 asp.net gridivew, c#。
我有一张桌子,上面有以下内容
updateID teamID empID shiftID
有 9 个不同班次的团队
我正在尝试拆分数据库结果,以便它根据 teamID 从 shift 列返回值
我不确定如何将结果合并为 9 列
Select shiftID as col1 from test1 where teamID = 1
Select shiftID as col2 from test1 where teamID = 2
Select shiftID as col3 from test1 where teamID = 3
Select shiftID as col4 from test1 where teamID = 4
等
谁能提供最佳解决方案,以便我可以将结果添加到网格视图中
【问题讨论】:
标签: c# sql-server datagridview