TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vishal Shinde
NA
25
46.5k
Convert Stored Procedure In to CASE STATEMENT Which is in IF ELSE
Dec 10 2011 7:20 AM
I want to Covert that Stored Procedure In Case Statement On in If Else
Please Help Me
CREATE PROCEDURE getlettestoffer(@offerid int)
As
Begin
Declare @offer varchar(50)
Select @offer=ImagePath from Offers where OfferID=@offerid
if @offer IS NOT NULL
Begin
Select TOP(10) Products.ProductID,Offers.OfferID,Offers.OfferTitle,Products.timestamp
from Products INNER JOIN Offers ON Products.ProductID=Offers.ProductID
where Offers.ImagePath is Not NULL order by timestamp desc
End
Else
Begin
Select TOP(10) Products.ProductID,Offers.OfferID,Offers.OfferTitle,Products.timestamp
from Products INNER JOIN Offers ON Products.ProductID=Offers.ProductID
order by timestamp desc
End
End
Any one help me to write this stored Procedure in case statement not in if Else statement
Reply
Answers (
1
)
Caching in ASP.NET
Hide .Net Page Extension