SQL newbie - Store data in database through SP.

[expired user #11071]'s profile image [expired user #11071] posted 6 years ago in General Permalink

Hi,

I created a querry - It works..

INSERT INTO dbo.General(Tracking_ID,BU_unit,Supplier,Customs_status) Values('hello','world','it','is me') Select * From dbo.General

MY question is how do I change this to a Storedprocedure and be able to save it.

Thank you very much.

BubikolRamios's profile image BubikolRamios posted 6 years ago Permalink

left click on db - create new stored proc ...

[expired user #11071]'s profile image [expired user #11071] posted 6 years ago Permalink

BEGIN SET NOCOUNT ON SET ANSI_WARNINGS OFF INSERT INTO dbo.General(Tracking_ID,BU_unit,Supplier,Customs_status) Values('hello','world','it','is me') Select * From dbo.General END

I added nocound and ansi_warning, either way if it is there or not i receive the error. Operation is not allowed when the object is closed

Please login to leave a reply, or register at first.