IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_save_equctgbrowse]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_save_equctgbrowse]
GO

-- =============================================
-- Author:<Author,,Name>
-- Create date: <Create Date,,>
-- Description:<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[mps_save_equctgbrowse] 
-- Add the parameters for the stored procedure here
@cmpid int,
@ec_id int,
@ec_querytime int,
@ec_groupfields nvarchar(200)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

    -- Insert statements for procedure here
UPDATE mps_equctg SET
ec_querytime = CASE WHEN @ec_querytime = -999999999 THEN ec_querytime ELSE @ec_querytime END,
ec_groupfields = CASE WHEN @ec_groupfields = '_none_' THEN ec_groupfields ELSE @ec_groupfields END
WHERE ec_id = @ec_id
SELECT 0 NONE WHERE 0=1
END