更新 sql/split.md

This commit is contained in:
吴长征 2024-09-05 16:29:54 +08:00
parent aafdd79c5e
commit de49e595db

View File

@ -1,5 +1,6 @@
--查询JK_CRB_ICD10表将icd10列按照、分割并将name和icd10联合组成新行插入JK_CRB_ICD10_tmp表。 查询JK_CRB_ICD10表将icd10列按照、分割并将name和icd10联合组成新行插入JK_CRB_ICD10_tmp表。
~~~sql
```sql
insert into JK_CRB_ICD10_tmp insert into JK_CRB_ICD10_tmp
select * from ( select * from (
SELECT name, SELECT name,
@ -14,4 +15,4 @@ select * from (
AND LEVEL <= LENGTH(t.string_to_split) - LENGTH(REPLACE(t.string_to_split, '、', '')) + 1 AND LEVEL <= LENGTH(t.string_to_split) - LENGTH(REPLACE(t.string_to_split, '、', '')) + 1
) ina where ina.icd10 is not null; ) ina where ina.icd10 is not null;
~~~ ```