Showing posts with label Case Statement in Sql Server. Show all posts
Showing posts with label Case Statement in Sql Server. Show all posts

Thursday, July 17, 2014

Case Statement in Sql Server

We can use CASE expression in the SELECT list, WHERE clauses, HAVING clauses, IN lists, DELETE and UPDATE statements, and even inside of built-in functions.
A Simple Example : 

select case due_amt when 0 then 'Paid' else due_amt end as FeeStatus from dbo.tbl_feeinfo