Hi Jason

If you have a look in Enterprise Manager and right click on stored
procedures it allows you to generate the syntax for a standard stored
procedure.

This is the format I have been shown to use and find it ideal, please note
the comments section this should be updated with every change, notice the
code that is listed first before the create stored proc checks if that
procedure exists and if it does drops it and re-creates what you have in
your proc.

However if you dont wish to use this syntax replace your 'create' with a
'alter':

------------------------------------------------------------------------------------------------

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[sp_YourStoredProc]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[sp_YourStoredProc]
GO

CREATE  PROCEDURE sp_YourStoredProc

/*
PROCEDURE: sp_YourStoredProc
TITLE:  This StoredProcedure Title
ACTION:  It does this and that
INPUTS:  Values being passed in if there is any
OUTPUTS: N/A

VERSION HISTORY
Version Date   Who   Description
--------   ---------------- ----------------------
----------------------------------------
1.0 10 July 2006  Jose Diaz  Baseline version
--------   ---------------- ----------------------
----------------------------------------
*/
AS

------------------------------------------------------------------------------------------------

HTH

Jose DIAZ


On 7/10/06, Jason Rogoz <[EMAIL PROTECTED]> wrote:
>
> I'm looking to see what everyone's stored proc templates look like...I've
> worked at a couple different places and the stored procs look a little
> different and want to ensure things are done properly from here on.
>
> Thanks
>
>
> Jason Rogoz
> Programmer / Analyst
>
> Zoom Communications Inc.
> Calgary, Alberta, Canada
>
> Office: (403) 229-2511
> Fax: (403) 229-4211
> Toll Free: 1-866-698-8932
>
> www.zoomcom.ca <http://www.zoomcom.ca/>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:245978
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to