
[url=javascript:alert(1);] [div]fdgfdgfdg\" on\"[/div] [/url]
select MYDATE,(case WJLX when 1 end) as WJLJ1,
(case WJLX when 2 end) as WJLJ2,
(case WJLX when 3 end) as WJLJ3,
(case WJLX when 4 end) as WJLJ4
from baobiao
谢谢!上述代码放在哪里的啊?是不是 数据库的 存储过程 中?还是在 *.aspc.cs 页面中???
刚学习了一下存储过程,如下是可行的。
ALTER PROCEDURE dbo.StoredProcedure1
/*
(
@parameter1 int = 5,
@parameter2 datatype OUTPUT
)
*/
AS
select mydate,max(case Wjlx when 1 then wjlj else '' end) as N'类型为1的文件路径 ',
max(case Wjlx when 2 then wjlj else '' end) as N'类型为2的文件路径 ',
max(case Wjlx when 3 then wjlj else '' end) as N'类型为3的文件路径 ',
max(case Wjlx when 4 then wjlj else '' end) as N'类型为4的文件路径 ' from baobiao group by mydate
RETURN
还有两个问题请教:
1、如何通过数据适配器将数据储存在数据集DATASET中?然后再将数据源绑定到GridView控件中显示出来啊
2、 以下的语句能否放在 *.aspx.cs 页面中啊???
select mydate,max(case Wjlx when 1 then wjlj else '' end) as N'类型为1的文件路径 ',
max(case Wjlx when 2 then wjlj else '' end) as N'类型为2的文件路径 ',
max(case Wjlx when 3 then wjlj else '' end) as N'类型为3的文件路径 ',
max(case Wjlx when 4 then wjlj else '' end) as N'类型为4的文件路径 ' from baobiao group by mydate
[此贴子已经被作者于2007-3-21 16:51:12编辑过]