Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to Delete some Rows in a Table Using CASE Statement
Posted
Comments
ZurdoDev 10-Dec-15 12:52pm    
The same way you would with a SELECT statement. Where are you stuck?
deepankarbhatnagar 11-Dec-15 5:18am    
Please explain your query.

1 solution

In the simplest scenarios, you would use the case statement in either of two ways:

1 - modify the contents of the WHERE clauses
2 - create a query from component data as implied by the case as a string and then EXEC the query.

If you need help in how to use case statement, consider https://msdn.microsoft.com/en-us/library/ms181765.aspx[^]
 
Share this answer
 

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