From 64754286d64f3a911422ad0f4f1c1dc38c0bd986 Mon Sep 17 00:00:00 2001 From: zch Date: Thu, 31 Oct 2024 10:50:40 +0800 Subject: [PATCH] =?UTF-8?q?change(steamMY)=20-=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=AE=A1=E7=AE=97=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 expand 字段用于计算蒸汽流量差值 - 保留 instrument_value 字段作为原始数据 --- steamMY.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/steamMY.sql b/steamMY.sql index c85a31a..88c47c3 100644 --- a/steamMY.sql +++ b/steamMY.sql @@ -10,7 +10,8 @@ BEGIN INSERT INTO ems_report_point_steam (monitor_code, instrument_value,begin_time,end_time,record_time) SELECT t1.monitor_code AS monitor_code, - CONVERT(DECIMAL(18, 2), ISNULL((t3.steam_flow-t4.steam_flow),0)) AS instrument_value, + CONVERT(DECIMAL(18, 2), ISNULL((t3.steam_flow-t4.steam_flow),0)) AS expand, + ISNULL(t3.steam_flow,0) AS instrument_value, DATEADD(HH, -1, @dateinfo) AS begin_time, DATEADD(HH, 0, @dateinfo) AS end_time,