Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
insertion of parameters
insertion of parameters
Rate Topic
Display Mode
Topic Options
Author
Message
johnhectar
johnhectar
Posted Thursday, April 01, 2010 9:25 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, September 29, 2010 11:33 AM
Points: 2,
Visits: 4
how can v insert parameters into procedure
Post #894927
spaghettidba
spaghettidba
Posted Thursday, April 01, 2010 9:30 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Thursday, May 16, 2013 8:29 AM
Points: 4,804,
Visits: 8,067
April fools?
Do you really want somebody to answer this, posed this is a question?
Take a look at the link in my signature, you'll find the right way to ask a question on a forum.
Get your two-cent-answer quickly
The Spaghetti DBA
Post #894935
Paul White
Paul White
Posted Thursday, April 01, 2010 10:14 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 7:18 PM
Points: 10,989,
Visits: 10,532
johnhectar (4/1/2010)
how can v insert parameters into procedure
?
Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #895002
Grant Fritchey
Grant Fritchey
Posted Thursday, April 01, 2010 10:56 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 3:04 PM
Points: 13,375,
Visits: 25,159
Assuming this is a serious question...
Since I'm unclear what you're asking, I'll tell you how to define parameters for your procedure. Assume you want to pass a column called ID to a procedure. You'd do this:
CREATE PROCEDURE dbo.MyProc
(@ID int)
AS...
The parameter is @ID. It's defined as an integer.
Is that what you're looking for?
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #895074
johnhectar
johnhectar
Posted Friday, April 02, 2010 11:48 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, September 29, 2010 11:33 AM
Points: 2,
Visits: 4
Thank you and how can i execute a procedure......
Post #895885
Grant Fritchey
Grant Fritchey
Posted Friday, April 02, 2010 11:55 AM
SSChampion
Group: General Forum Members
Last Login: Yesterday @ 3:04 PM
Points: 13,375,
Visits: 25,159
johnhectar (4/2/2010)
Thank you and how can i execute a procedure......
Well that depends on the context. Depending how you are connecting to the database server, different rules are going to apply. I'll assume you're connecting using SQL Server Management Studio and that you're running this through a query window. To execute a procedure you do this:
EXEC dbo.MyProc @Param1 = 42, @Param2 = 24
So, clearly you're calling EXEC to execute the procedure (you can also call EXECUTE). 'dbo' is the schema that owns the proc. MyProc is the name and the other two values are parameters and the values that you're setting them to. That's going to vary between procedures of course.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #895894
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.