当前位置:网站首页>SQLserver adds a judgment
SQLserver adds a judgment
2022-08-10 02:52:00 【CSDN q&a】
SELECT count(distinct lp.lot_number)as ELzs
FROM (SELECT lp.lot_number,lp.TransDate,lp.WorkorderId ,lp.device_number,
ROW_NUMBER() OVER( PARTITION BY lp.lot_number ORDER BYlp.TransDate)RN FROM Lot_Process lp)lp
WHERE RN=2 and (lp.WorkorderId like 'PB%' or lp.WorkorderId like 'DB%') and
lp.device_number in('M1-EL1-L1-01','M1-EL1-L1-02')
and lp.TransDate between convert(varchar(11),dateadd(day,-1,getdate()),120)+'08:00:00'
and convert(varchar(11),dateadd(day,-1,getdate()),120)+'19:59:59'
Add a judgment to help. Before 9 o'clock every day, check yesterday's 8:00 to yesterday's 20:00, and after 9:00, check today's 8:00 to today's 20:00.
边栏推荐
猜你喜欢
unity编辑器扩展界面使用 List
[论文阅读] Multimodal Unsupervised Image-to-Image Translation
【干货】集成学习原理总结
unity 报错 Unsafe code may only appear if compiling with /unsafe. Enable “Allow ‘unsafe‘ code“ in Pla
OOD论文:Revisit Overconfidence for OOD Detection
hopscotch game
Maya制作赛博朋克机器人模型
数组(一)
STM32F103驱动HCSR04超声波测距显示
color socks problem
随机推荐
xss的DOMPurify过滤框架:一个循环问题以及两个循环问题
网络爬虫错误
hopscotch game
SQL注入的order by ,limit与宽字节注入
Open3D 泊松盘网格采样
Unity vertex animation
STM32F103驱动HCSR04超声波测距显示
Unity开发者必备的编辑器技巧
Janus actual production case
SQLserver加个判断
c# 解决CS8602告警 解引用可能出现空引用
2022强网杯 Quals Reverse 部分writeup
[论文阅读] Diverse Image-to-Image Translation via Disentangled Representations
【干货】集成学习原理总结
[Swoole Series 3.5] Process Pool and Process Manager
UXDB现在支持函数索引吗?
微生物是如何影响身体健康的
桌面云组件介绍与安装
Button countdown reminder
Shader Graph learns various special effects cases