Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Query 1

Status
Not open for further replies.

GammelNok

Programmer
Jun 21, 2002
32
0
0
US
I am trying to create a stored procedure using two parameters to append a new record to an existing table

any tips gratefully received
Any takers?

Cheers

Hans
 
Code:
CREATE PROC apInsertData
  @p1 varchar(20),
  @p2 int
AS

INSERT table1 (col1, col2)
VALUES @p1, @p2
GO

--James
 
Oops, the VALUES should have parentheses:

Code:
INSERT table1 (col1, col2)
VALUES (@p1, @p2)

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top