Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-09-22 : 10:20:13
|
Mike writes "I know this is a basic question, but I am new to all of this...Where do you write the stored procedure code? The Global.asp file, its own file? Thanks for the help" |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-09-22 : 10:28:53
|
Stored procedures are database objects "stored" in the database.CODO ERGO SUM |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2006-09-22 : 12:43:52
|
Where do you write the stored procedure code?I do it in Query Analyzer (as sql server client tool) and save the file as a *.sql file on the server itself.Here's a sproc shellif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_procname]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure [dbo].[usp_procname]GOcreate procedure usp_procname@objname nvarchar(776)asset nocount on-- SQL Stuffset nocount offreturn (0) -- sp_dependsGO And if you want a fuller template, read herehttp://weblogs.sqlteam.com/brettk/archive/2004/05/25/1378.aspxTQL, no salt, rocks pleaseBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
|
|
|
|
|