nari.koud
Ten Centuries
Points: 1116
More actions
September 16, 2010 at 1:02 pm
#387802
Based on a condition I should assign column value
If Grade is A then rank should be 1 or 2
How should i put it in Tsql??
Eg: If Grade = 'A'
BEGIN
SELECT rank =1, rank =2
END
WayneS
SSC Guru
Points: 95461
September 16, 2010 at 1:12 pm
#1222521
It seems like the CASE statement is what you're looking for.
WayneMicrosoft Certified Master: SQL Server 2008Author - SQL Server T-SQL Recipes
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply