Indeed Jose, you have learned well...:-)

Though as you know, you would not name a user SP "sp_"








"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Jose Diaz <[EMAIL PROTECTED]>
To: CF-Talk <[email protected]>
Sent: Mon Jul 10 19:03:27 2006
Subject: Re: OT: stored proc template

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:245980
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