SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_no='LJCG001H' THEN dbo.ELTPNAME(a.fw_nu) ELSE d.fm_name END),e.fw_state_nm,f.fw_rmk_nm
FROM LJSS007H a (nolock)
left join LJPA003H b (nolock) on a.dp_no=b.dp_no
left join LJPA001H c (nolock) on c.pa_no=a.pa_no1
left join LJSS002H d (nolock) on d.fm_no=a.fm_no
left join LJSS008H e (nolock) on a.fw_state=e.fw_state_no
left join LJSS009H f (nolock) on a.fw_rmk_no=f.fw_rmk_no
WHERE a.fw_state>=2 And a.pa_no ='A0202002' and a.cr_time>='2024-07-01 00:00:00' and a.cr_time<='2024-07-19 23:59:59'
SQL Server CASE WHEN ... THEN ... ELSE ... END
相關文章
- SQL中的case when then else end用法 【詳細】轉載SQL
- sql case when, Exist ,group by ,聚合SQL
- Oracle case when改寫SQLOracleSQL
- case when 語句
- SQL語句case when外用sum與count的區別SQL
- mysql中case when的使用MySql
- SQLServer使用case when中的order bySQLServer
- 在CSS中如何使用 when/elseCSS
- Oracle vs PostgreSQL Develop(30) - Index&Case whenOracleSQLdevIndex
- 【Case】SQL SERVER 屬性OWNER不可用於資料庫xxx。SQLServer資料庫
- When Rubber Meets the Road: Unveiling the Curious Case of Volvo Truck Engine Failures!AI
- Oracle 條件索引 case when 報錯解決方案Oracle索引
- SQL CASE 表示式SQL
- 消除程式碼中的 if-else/switch-case
- sqlserver使用order by case when進行優先順序排序SQLServer排序
- 如何優化程式碼中大量的if/else,switch/case?優化
- [network][easy case]troubleshoting the connection to a remote serverREMServer
- Oracle group by與case when統一單位後統計數量Oracle
- 語法解析器續:case..when..語法解析計算
- MySQL中case?when對NULL值判斷的踩坑記錄RTGYMySqlNull
- sql serverSQLServer
- 瞭解GaussDB SQL中CASE表示式SQL
- mysqldump: Error 2013: Lost connection to MySQL server during query when dumpingMySqlErrorServer
- Moebius for SQL ServerSQLServer
- sql server 使用SQLServer
- SQL Server教程SQLServer
- 神奇的 SQL 之 CASE表示式,妙用多多 !SQL
- GaussDB SQL基本語法示例-CASE表示式SQL
- 幹掉Switch-Case、If-Else----訂閱釋出模式+事件驅動模式模式事件
- MySQL報錯Slave: received end packet from server, apparent master shutdownMySqlServerAPPAST
- 雲端計算學習路線圖素材、課件,msyql中CASE WHEN語法
- SQL SERVER優化SQLServer優化
- Nodejs 操作 Sql ServerNodeJSSQLServer
- SQL Server 別名(as)SQLServer
- sql server遞迴SQLServer遞迴
- Sql server with as update用法SQLServer
- SQL Server下載SQLServer
- SQL Server Left joinSQLServer