KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
does anyone know whats wrong with this nested select statement? It complains about missing )'s but i can't understand why it doesn't work (i have left off the other bits of the statement) Select (CASE WHEN REQUESTS.grade_id = 1 THEN (CASE WHEN ((date_completed-date_submitted)*24*60)<=30 THEN 'Yes' ELSE 'No' END) ELSE CASE WHEN REQUESTS.grade_id = 2 THEN (CASE ((date_completed-date_submitted)*24*60) <=120 THEN 'Yes' ELSE 'No' END) ELSE CASE WHEN REQUESTS.grade_id = 3 THEN (CASE ((date_completed-date_submitted)*24*60)<=14400 THEN 'Yes' ELSE 'No' END) END)in_SLA If i just do Select (CASE WHEN REQUESTS.grade_id = 1 THEN (CASE WHEN ((date_completed-date_submitted)*24*60)<=30 THEN 'Yes' ELSE 'No' END) END) in_sla It works fine! any help is much appreciated M sorry being a tard i'm missing the whens from the nested cases
Tags (comma-separated)
Save Edits
Cancel