From f7d89bc6f2c57ea1eeb0c3e787f310a3805db079 Mon Sep 17 00:00:00 2001 From: wintsa Date: Fri, 21 Mar 2025 10:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=BC=96=E5=8F=B7sql.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 更新最新编号sql.sql | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/更新最新编号sql.sql b/更新最新编号sql.sql index 53f1403..3acfac4 100644 --- a/更新最新编号sql.sql +++ b/更新最新编号sql.sql @@ -14,4 +14,23 @@ SET gcbhz = ) || ']' from uf_GCLXXX WHERE - xglc = '{?requestid}'; \ No newline at end of file + xglc = '{?requestid}'; + + +--不通过xh + UPDATE formtable_main_1576 +SET jsxmbh = + 'JSXMSQ-' || + SUBSTR('{?sqrq}', 1, 4) || + '-' || + ( + SELECT LPAD( + NVL(MAX(TO_NUMBER(REGEXP_SUBSTR(jsxmsqbh, '-(\d{4})$', 1, 1, NULL, 1))), 0) + 1, + 4, '0' + ) + FROM uf_gcxx + WHERE + REGEXP_SUBSTR(gcbhz, '-(\d{4})-', 1, 1, NULL, 1) = SUBSTR('{?sqrq}', 1, 4) + ) +WHERE + requestid = '{?requestid}' \ No newline at end of file