1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| USE [EOLData] GO
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER PROCEDURE [dbo].[UpDateHLAResult] ( @VIN varchar(30), @ZTS varchar(30), @LLOffset FLOAT ) AS BEGIN
SET NOCOUNT ON; DECLARE @sem varchar(30) = ''''
DECLARE @LHB FLOAT
IF EXISTS(select [左远光灯高] from [dbo].[车型配置] where [ZTS]=@ZTS) BEGIN select @LHB = [左远光灯高] from [dbo].[车型配置] where [ZTS]=@ZTS END ELSE BEGIN select @LHB = [左远光灯高] from [dbo].[64字节车型配置] where [ZTS]=@ZTS END
SET @LHB = @LHB - @LHOffset begin exec( 'UPDATE [dbo].[灯光表] SET ' +'[左远光灯高] = '+@sem+ @LHB +@sem +'WHERE [VIN] = '+@sem+ @VIN +@sem ) end END
|