this procedure doesnt make any sense. whats the use of UPDATE if you're just trying to set a value for external variable? wont below be enough?
SET @P = @P1
if the attempt is to set the value of field which is passed dynamically then you need dynamic sql
CREATE PROCEDURE BillingUpdateVoip
(
@P varCHAR(50),
@P1 varCHAR(15),
@P2 varchar(15)
)
AS
DECLARE @SQLString varchar(8000)
SET @SQLString = 'Update VoipNumbers SET ' + @P + ' = ''' + @P1 + ''' where Voipnumber= ''' + @P2 + ''''
EXEC(@SQLString)
GO
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/