Zolf
asked on
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,Customer Number,Cus tomerName, StartDate, EndDate,Co mment) VALUES ('"+terminalPort_id+"','"+ ADSLNo+"', '"+custome rName+"',' "+currentD ate+"','"+ endDate+"' ,'"+commen t+"')";
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,Customer
You're really in the wrong TA - this is Java...
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,Customer Number,Cus tomerName, StartDate, EndDate,Co mment)
SELECT @terminalPort_id,@ADSLNo,@ customerNa me,@curren tDate,@end Date,@comm ent
GO
@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,Customer
SELECT @terminalPort_id,@ADSLNo,@
GO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.