IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[up_myinfo_sex]') AND type = 'P')
DROP PROCEDURE [dbo].[up_myinfo_sex]
GO
create proc [dbo].[up_myinfo_sex]
@fldvalue nvarchar(100),
@cmpid int,
@cuid int
as
declare @str nvarchar(1000)
BEGIN
if(@fldvalue !='')
begin
set @str='update mps_employee set cu_gender='+@fldvalue+' where cu_cmpid= '+convert(nvarchar(100),@cmpid)
+' and cu_id= '+convert(nvarchar(100),@cuid)
exec(@str)

end
END