write stored procedure

hello there,

i want to change this query to stored procedure in sql server 2005.how will it be.please help.

"INSERT INTO bookht_Port_History (TERMINAL_PORT_ID,CustomerNumber,CustomerName,StartDate,EndDate,Comment) VALUES ('"+terminalPort_id+"','"+ADSLNo+"','"+customerName+"','"+currentDate+"','"+endDate+"','"+comment+"')";
zolfAsked:
Who is Participating?
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
0
 
CEHJCommented:
You're really in the wrong TA - this is Java...
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
Create Procedure ins_bookht_Port_History
@terminalPort_id  int,
@ADSLNo int,
@customerName varchar(100),
@CurrentDate datetime ,
@endDate datetime,
@comment varchr(100)
AS
SET NOCOUNT ON
INSERT INTO bookht_Port_History (TERMINAL_PORT_ID,CustomerNumber,CustomerName,StartDate,EndDate,Comment)
SELECT @terminalPort_id,@ADSLNo,@customerName,@currentDate,@endDate,@comment

GO
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.