« Back to the main page

Language: SQL, Submitted: 2/03/10, Country: United Kingdom - Raw | Download
DECLARE @IsRead bit
set @IsRead = 0

SELECT 	* FROM 	dbo.[UserMessage] WHERE [ToUserID] = 36 AND 
DateRead
CASE WHEN @IsRead = 0
THEN  is null
ELSE is not null
END