Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

What to do in case multiple conditions?

Asked by Alex Gonzalez Sep 30, 2022 1.1K views 1 answer
Share

About this question

I need to change returned value, from select statement, based on several conditions. I tried something like that:

,CASE i.DocValue
  WHEN 'F2' AND c.CondCode IN ('ZPR0','ZT10','Z305') THEN c.CondVal
  ELSE 0
END as Value

Why is it not working and what is the recommended way to do this ? There will be next several WHEN conditions.

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.