Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.
SELECT P1.Prod_ID , P1.Entity_ID , P1.docDate , Vol = Case WHEN @Product = 'Gas' THEN P1.Gas WHEN @Product = 'Oil' THEN P1.Oil WHEN @Product = 'Water' THEN P1.Water Else NULL End , Ignore = Case When @Product = 'Gas' THEN P1.IgnoreGas WHEN @Product = 'Oil' THEN P1.IgnoreOil WHEN @Product = 'Water' THEN P1.IgnoreWater ELSE NULL End FROM tbl_sysProduction as P1 WHERE (CASE WHEN @Product = 'Gas' Then P1.IgnoreGas WHEN @Product = 'Oil' THEN P1.IgnoreOil WHEN @Product = 'Water' THEN P1.IgnoreWater ELSE 0 END) = 0
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|SQL syntax for max(date)||3||39|
|SQL Lag Function DateDiff||2||26|
|SQL Server sp_executesql / Change Tracking Version() results into variable||4||30|
|T-SQL: Number of Records is Greater Than One||7||51|
Join the community of 500,000 technology professionals and ask your questions.