change like this and try
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[ei_sp_LocationInsert]
(
@Name varchar(100)=null,
@Code varchar(35)=null,
@Desc varchar(255)=null,
@CityID int=null,
@StateID int=null,
@CountryID int=null,
@Company int=null
)
as
begin
select @stateID=stateID from tabe1 where ID=@company
select @cityID=cityID from tabe1 where ID=@company
select @countryID=countryID from tabe1 where ID=@company
insert into table2
(
[Name],
Code,
[Desc],
CityID,
StateID,
CountryID,
company
)
values
(
@Name,
@Code,
@Desc,
@CityID,
@StateID,
@CountryID,
@Company,
)
end