Click here to Skip to main content
15,892,269 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
SQL
UPDATE Temp1 a SET TimeStamp1 = CASE(WHEN (a.TimeStamp1 IN(SELECT TimeStamp1 FROM a WHERE a.DealName = 'Disha Rufous' AND a.DealStep = 'Sent for Risk feedback') - a.TimeStamp1 IN(SELECT TimeStamp1 FROM a WHERE a.DealName = 'Disha Rufous' AND a.DealStep = 'De-dupe confirmation received') IS NOT NULL THEN '0'  ELSE TimeStamp1 END) WHERE Temp1.DealName = 'dede' AND Temp1.StepName = 'Risk feedback addressed'


Error is occurring at
SQL
THEN


What I have tried:

Tries using different combinations but doesn't work
Posted
Updated 30-Jun-16 1:52am
Comments
Richard Deeming 30-Jun-16 9:15am    
The - between the two a.TimeStamp1 In (...) conditions looks wrong. What are you actually trying to achieve?

1 solution

Remove the bracket between CASE and WHEN (and it's matching close bracket).
 
Share this answer
 
Comments
Member 12605284 30-Jun-16 8:09am    
Then it is showing same error at WHEN

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900