Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Need a Query where with case statement

$
0
0
This Query is not working please help........select * from tbl eINNER JOIN LKUP L ON e.ID=L.LKUP_ID WHERE CASE WHEN ISNULL(DATEPART(YY,(SU_DT)),0)=2014 OR ISNULL(DATEPART(mm,(SU_DT)),0)>=11THEN (LKUP_VAL_EN LIKE('V2%') OR LKUP_VAL_EN LIKE('V3%'))ELSE LKUP_VAL_EN LIKE('V2%') END AND e.Active=1

Viewing all articles
Browse latest Browse all 3145

Trending Articles