Re: newbie - Stored procedure
From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 02/01/05
- Next message: Tom Moreau: "Re: DB"
- Previous message: Ami Levin: "typo error..."
- In reply to: Boonaap: "newbie - Stored procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Feb 2005 07:03:21 -0500
One proc should do it. You can have parameters with default values, if you
so choose:
create proc MyProc
(
@id int
, @x char (5) = 'ALFKI'
)
as
...
-- Tom ---------------------------------------------------- Thomas A. Moreau, BSc, PhD, MCSE, MCDBA SQL Server MVP Columnist, SQL Server Professional Toronto, ON Canada www.pinnaclepublishing.com . "Boonaap" <Boonaap@discussions.microsoft.com> wrote in message news:415B2831-6626-457A-98D4-42ED64F2C7F7@microsoft.com... I have simple question - could be a bit stupid I created a form in which several fields are obligatory, some are free to fill in now what is the best practice to follow Should i create several SP's for every possible combination ? Should i Create one SP where variables are possibly empty (if that is the best thing to do, what's the right syntax ?) Or should I create one SP with the obligatory values, and afterwards search through the resultset? thanx in advance...
- Next message: Tom Moreau: "Re: DB"
- Previous message: Ami Levin: "typo error..."
- In reply to: Boonaap: "newbie - Stored procedure"
- Messages sorted by: [ date ] [ thread ]