using Below sample query(2 times
same query with one condition as extra) to get the 2 type of result set.
IF @Status = 'A'
Select * From TableName where ID =
@ID and Value > 200
Else
Select * From TableName where ID =
@ID
How can i use Case statement to
avoid to create the same select statement 2 times.
Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech
For free Ebook : http://kaashivinfotech.com/Ebooks.aspx
No comments:
Post a Comment