diff --git a/sql/split.sql b/sql/split.md similarity index 81% rename from sql/split.sql rename to sql/split.md index ad7291d..b11809d 100644 --- a/sql/split.sql +++ b/sql/split.md @@ -1,5 +1,6 @@ ---查询JK_CRB_ICD10表,将icd10列按照、分割并将name和icd10联合组成新行,插入JK_CRB_ICD10_tmp表。 -~~~sql +查询JK_CRB_ICD10表,将icd10列按照、分割并将name和icd10联合组成新行,插入JK_CRB_ICD10_tmp表。 + +```sql insert into JK_CRB_ICD10_tmp select * from ( SELECT name, @@ -14,4 +15,4 @@ select * from ( AND LEVEL <= LENGTH(t.string_to_split) - LENGTH(REPLACE(t.string_to_split, '、', '')) + 1 ) ina where ina.icd10 is not null; -~~~ \ No newline at end of file +``` \ No newline at end of file