去字段中的内容
来源:互联网 发布:四层别墅网络覆盖方案 编辑:程序博客网 时间:2024/05/01 08:37
处理年龄问题
AGE AGE
007Y 7岁
045D 45天
013M 13月
SELECT
case
when ascii(SUBSTR(replae(patientvisit.age,' ',''), 1, 1)) >= '48' and
ascii(SUBSTR(patientvisit.age, 1, 1)) <= '57' then
SUBSTR(patientvisit.age, 1, 3) || (case
when SUBSTR(patientvisit.age, 4, 1) LIKE 'Y' then
'岁'
when SUBSTR(patientvisit.age, 4, 1) LIKE 'M' then
'月'
when SUBSTR(patientvisit.age, 4, 1) LIKE 'D' then
'天'
END)
WHEN ascii(SUBSTR(patientvisit.age, 2, 1)) >= '48'and ascii(SUBSTR(patientvisit.age, 2, 1)) <= '57'
THEN SUBSTR(patientvisit.age, 2, 2) || (case
when SUBSTR(patientvisit.age,
4,
1) LIKE 'Y' then
'岁'
when SUBSTR(patientvisit.age,
4,
1) LIKE 'M' then
'月'
when SUBSTR(patientvisit.age,
4,
1) LIKE 'D' then
'天'
END)
ELSE SUBSTR(patientvisit.age, 3, 1) || (case
when SUBSTR(patientvisit.age,
4,
1) LIKE 'Y' then
'岁'
when SUBSTR(patientvisit.age,
4,
1) LIKE 'M' then
'月'
when SUBSTR(patientvisit.age,
4,
1) LIKE 'D' then
'天'
END) END AS Age
from patientvisit
- 去字段中的内容
- 去掉字段中的空格但英文字段不去空格
- Access数据字段内容去换行回车TAB符号函数
- ntext数据类型字段中的内容替换
- 调用成员资格管理器中的内容字段
- 替换字段文本中的标签内容
- 对数据库表中的某一字段去重分组排序
- List集合中的对象按照某个字段去重实现
- mysql ,将表B中的cid字段中的内容,插入到表A中的cid字段
- 用Excel VBA代码实现去重录入某字段内容
- 如何把一个字段中的重复内容列出来?
- 批量修改数据字段中的不规范内容
- 解析记录集(ResultSet)中的字段和内容
- 表格中【name】字段中的内容不重复实践经验
- 列出MSSQL数据库中的表和字段内容
- mysql中替换某个字段中的某一些内容
- sql积累--替换指定字段数据中的指定内容
- 按内容截取行中的某字段(列)
- html li 背景色 大小
- 使用http连接到Analysis services
- 在IIS上部署基于django WEB框架的python网站应用
- 自省
- 分布式测试框架介绍
- 去字段中的内容
- NC库存单据增加审批流资源的索引贴
- jQuery开发笔记
- Android系统在超级终端下必会的命令大全(adb shell命令大全)
- 函数资源的自动释放
- ov7670+al422
- C#设计模式之9——组合模式
- CloudSim类图
- kthread usage