I have a table named Services and it has two columns ID and Price. here is my code:
com.CommandText = "UPDATE Services SET Price = (CASE WHEN (ID = 'Bedsheet') THEN @Bedsheet WHEN (ID = 'Comforter') THEN @Comforter WHEN (ID = 'PressOnly') THEN @PressOnly WHEN (ID = 'WDF') THEN @WDF WHEN (ID = 'WDP') THEN @WDP END) WHERE ID IN('Bedsheet','Comforter','PressOnly','WDF','WDP')"
It always says a Syntax error (missing operator) in query expression message. What do I have to correct in my code? Thanks in advance.