if
( /* 4,对比员工的打卡是否在异常*/
case when DATEDIFF(ss,case when @yymmdd1<@yymmdd then dateadd(hh,-24,@cardtime1) else @cardtime1 end,@cardtime)>( select top 1 IntervalTime from EMRealMonitorTimeSet where mid1=@mid1 and mid2=@mid)*60
and @empid=@empid1 and exists( select top 1 mid1,mid2 from IntervalTime where mid1=@mid1 and mid2=@mid and @cardtime between time1 and time2 and @cardtime1 between time1 and time2)
or (select top 1 IsnoEntry from EMRealMonitorTimeSet where mid1=@mid1 and mid2=@mid)=1
then 1 else 0
end
)>0
这SQL 语句怎么转化成oracle语句
( /* 4,对比员工的打卡是否在异常*/
case when DATEDIFF(ss,case when @yymmdd1<@yymmdd then dateadd(hh,-24,@cardtime1) else @cardtime1 end,@cardtime)>( select top 1 IntervalTime from EMRealMonitorTimeSet where mid1=@mid1 and mid2=@mid)*60
and @empid=@empid1 and exists( select top 1 mid1,mid2 from IntervalTime where mid1=@mid1 and mid2=@mid and @cardtime between time1 and time2 and @cardtime1 between time1 and time2)
or (select top 1 IsnoEntry from EMRealMonitorTimeSet where mid1=@mid1 and mid2=@mid)=1
then 1 else 0
end
)>0
这SQL 语句怎么转化成oracle语句
http://yangdi1984.blog.hexun.com/20238141_d.html