It works the same way. A stored procedure uses the same syntax basically,
but you
can pass in variables.

For instance, here's a stored procedure I have:

===================================================
Alter Procedure dbo.spAdmin_InsertForumGroup

 (
  @name VARCHAR(50),
  @displayOrder INT,
  @visible BIT
 )

AS

-- Update our displayOrder if we're placing this one higher up in the list
UPDATE tblForumGroups SET
 displayOrder = displayOrder + 1
WHERE displayOrder >= @displayOrder


-- Now insert our new record
INSERT INTO tblForumGroups
([name], displayOrder, visible)
VALUES
(@name, @displayOrder, @visible)


RETURN
===================================================

Hope that helps,

Chris Tifer
http://www.emailajoke.com

----- Original Message -----
From: "Falls, Travis D (CASD, IT)" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 9:15 AM
Subject: Stored procedure


> I am sorry for the off topic, but I didn't know where else to find out.
> Does anyone know where I can learn how to write a insert stored procedure.
> I have never wrote a S.P.
>
> t
>
>
> This communication, including attachments, is for the exclusive use of
> addressee and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, any use, copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you are not the intended recipient, please notify the sender
> immediately by return email and delete this communication and destroy all
copies.
>
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to