From 2b986d881fbba61ebff7c09dd037b63bfe1777a3 Mon Sep 17 00:00:00 2001 From: Anton Berezhnyi Date: Thu, 26 Sep 2024 22:51:01 -0400 Subject: [PATCH] Exclude ID_T_PD_CMS=null --- importer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/importer.go b/importer.go index 07a780c..432e830 100644 --- a/importer.go +++ b/importer.go @@ -39,7 +39,8 @@ const ScoreQuery = `SELECT ID, ID_OBJ AS STUDENT_ID, when 'Так' then case COALESCE(XR_1, XS10_4, 'NULL') when 'NULL' then 1 else 0 end else 1 end ) AS IS_DELETED FROM T_EV_9 -WHERE REGDATE BETWEEN ? AND ? +WHERE REGDATE BETWEEN ? AND ? + AND ID_T_PD_CMS IS NOT NULL ORDER BY ID_OBJ, XI_2, XI_4 ASC` func (importer *ScoresImporter) execute(startDatetime time.Time, endDatetime time.Time, year int) (err error) {