all groups > sql server data mining > september 2003 >
You're in the

sql server data mining

group:

conditions within stored procedure


conditions within stored procedure Wayne Hui
9/19/2003 1:24:58 PM
sql server data mining:
Hi, I was wondering if there's a way to put conditions
within a select statement in a stored procedure. For
example if I want to do different ordering depending on the
input type -

ALTER procedure test
@inputType int
AS
BEGIN
select * from someTable

if (@inputType = 1)
order by someCol1
else
order_by someCol2
END

Is this possible in some way?

Sincerely,
Wayne

Re: conditions within stored procedure Vishal Parkar
9/20/2003 4:35:10 AM
pls see reply in .programming

--
- Vishal
[quoted text, click to view]

AddThis Social Bookmark Button