Skip to main content

SQL EXCEL GET TEXT


以 SQL 语句引入 Excel 格式门诊日志,筛查得到疑似传染病门诊日志:

SQL 命令文本



sselect 姓名, 性别, 年龄, 病人诊断, 结束时间 from [工作表名$]
 where 病人诊断 like "%鼠疫%"
 or 病人诊断 like "%霍乱%"
 or 病人诊断 like "%非典型肺炎%"
 or 病人诊断 like "%艾滋病%"
 or 病人诊断 like "%AIDS%"
 or 病人诊断 like "%HIV%"
 or 病人诊断 like "%病毒性肝炎%"
 or 病人诊断 like "%脊髓灰质炎%"
 or 病人诊断 like "%禽流感%"
 or 病人诊断 like "麻疹%"
 or 病人诊断 like "%流行性出血热%"
 or 病人诊断 like "%狂犬病%"
 or 病人诊断 like "%流行性乙型脑炎%"
 or 病人诊断 like "%乙脑%"
 or 病人诊断 like "%登革热%"
 or 病人诊断 like "%炭疽%"
 or 病人诊断 like "%痢疾%"
 or 病人诊断 like "%肺结核%"
 or 病人诊断 like "%结核性胸膜炎%"
 or 病人诊断 like "%伤寒%"
 or 病人诊断 like "%流脑%"
 or 病人诊断 like "%百日咳%"
 or 病人诊断 like "%白喉%"
 or 病人诊断 like "%流行性脑脊髓膜炎%"
 or 病人诊断 like "%新生儿破伤风%"
 or 病人诊断 like "%猩红热%"
 or 病人诊断 like "%布鲁氏菌病%"
 or 病人诊断 like "%淋病%"
 or 病人诊断 like "%梅毒%"
 or 病人诊断 like "%钩端螺旋体病%"
 or 病人诊断 like "%钩体病%"
 or 病人诊断 like "%血吸虫病%"
 or 病人诊断 like "%疟疾%"
 or 病人诊断 like "%流行性感冒%"
 or 病人诊断 like "%流感%" and 病人诊断 not like "%预防%"
 or 病人诊断 like "%风疹%"
 or 病人诊断 like "%急性出血性结膜炎%"
 or 病人诊断 like "%麻风病%"
 or 病人诊断 like "%黑热病%"
 or 病人诊断 like "%包虫病%"
 or 病人诊断 like "%丝虫病%"
 or 病人诊断 like "%感染性腹泻%"
 or 病人诊断 like "%细菌%腹泻%"
 or 病人诊断 like "%手足口病%"
 or 病人诊断 like "%尖锐湿疣%"
 or 病人诊断 like "%生殖器疱疹%"

解析 SQL 语句


'关键词',绝对符合关键词,即精确查询。

'%关键词%',包含关键词,关键词前后有其他字符,即模糊检索。

like '%关键词1%' and not like '%关键词2%',同一命令包含关键词1,同时排除关键词2。例如,检索模糊查询“麻疹”同时剔除“荨麻疹”:like '%麻疹%' and not like '%荨麻疹%'

Comments

TOP