如何在DutyDate的两个datetime之间添加查询条件

.Net技术 码拜 9年前 (2015-03-29) 1733次浏览 0个评论
declare @s nvarchar(4000)  
Select     @s=isnull(@s+",","")+quotename([DutyDate]) 
from DutyInfo group by [DutyDate]  
exec("select * from DutyInfo pivot (max([DutyName]) for [DutyDate] in("+@s+"))b  ") 
如何在DutyDate的两个datetime之间添加查询条件
declare @s nvarchar(4000)  
Select     @s=isnull(@s+",","")+quotename([DutyDate]) 
from DutyInfo group by [DutyDate]  
where DutyDate between A and  B 
exec("select * from DutyInfo pivot (max([DutyName]) for [DutyDate] in("+@s+"))b  ")
/pre>
如何在DutyDate的两个datetime之间添加查询条件
40分
declare @s nvarchar(4000)  
Select     @s=isnull(@s+",","")+quotename([DutyDate]) 
from DutyInfo group   
where DutyDate between A and  B 
y [DutyDate]
exec("select * from DutyInfo pivot (max([DutyName]) for [DutyDate] in("+@s+"))b  ")
/pre>
如何在DutyDate的两个datetime之间添加查询条件
这是oracle sql的高级用法吧,你google 搜下语法呢,oracle的document一般都非常详细吧

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明如何在DutyDate的两个datetime之间添加查询条件
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!