CREATE PROCEDURE INSERT_WEBSITEDETAILS @WebsiteName VARCHAR(100), @LiveIp1 NVARCHAR(100) , @LiveIp2 NVARCHAR(100) , @PortId VARCHAR(100), @ERROR VARCHAR(100) OUT AS BEGIN SET NOCOUNT ON; DECLARE @Createdate DATE declare @Exist int set @Exist = (SELECT count( PortId) FROM Websitedetails WHERE @PortId=PortId AND @WebsiteName=WebsiteName) if(@Exist=0) BEGIN INSERT INTO Websitedetails (WebsiteName,LiveIp1,LiveIp2,PortId,Createdate) VALUES (@WebsiteName,@LiveIp1,@LiveIp2,@PortId,GETDATE()) SET @ERROR='UPDATED SUCCESSFULLY' END ELSE BEGIN SET @ERROR=' already exists' END END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)