Click here to Skip to main content
15,071,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am have one sp and in this sp i am trying to use when then when i use when statement in this i checked column1 =3 then i want to write another qury so can i write if yes how i am giving example to understand my problem sea
DECLARE @CharGender Char(1),
	@Gender  Varchar(20);
SET @CharGender = 'F';
SET @Gender = 
	CASE @CharGender
		WHEN N'm' THEN N'Male'---(i want to another select statement here can i write in THEN)
		WHEN N'M' THEN N'Male'
		WHEN N'f' THEN N'Female'
		WHEN N'F' THEN N'Female'
	END;
Posted
Updated 2-May-11 1:15am
v2
Comments
[no name] 2-May-11 7:00am
   
which kind of select statement.
it will with one row or more then one row?
you need to brief your question.

1 solution

Have a look at nested cases. Search online and you should get some links / examples.
   

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