Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 help with creating stored procedure ?

Author  Topic 

asp__developer
Posting Yak Master

108 Posts

Posted - 2012-08-10 : 16:56:14
I am trying to create a new stored procedure but getting error:

My SP

CREATE PROCEDURE [dbo].[supplier]

INSERT INTO supplier
(supplier_id, supplier_name)
VALUES
(24553, 'IBM');




Error
Msg 156, Level 15, State 1, Procedure supplier, Line 4
Incorrect syntax near the keyword 'INSERT'.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-08-10 : 17:12:34
quote:
Originally posted by asp__developer

I am trying to create a new stored procedure but getting error:

My SP

CREATE PROCEDURE [dbo].[supplier]
AS
INSERT INTO supplier
(supplier_id, supplier_name)
VALUES
(24553, 'IBM');




Error
Msg 156, Level 15, State 1, Procedure supplier, Line 4
Incorrect syntax near the keyword 'INSERT'.





Too old to Rock'n'Roll too young to die.
Go to Top of Page
   

- Advertisement -