摘要: (一)Oracle to_char()函数中的IW,WW 周别显示 1)ww的算法为每年1月1日为第一周开始,date+6为每一周结尾 例如20050101为第一周的第一天,而第一周的最后一天为20050101+6=20050107 公式 每周第一天 :date + 周 * 7 - 7 每周最后一天 阅读全文
posted @ 2019-10-09 10:18 吴土炮Jared 阅读(5236) 评论(0) 推荐(0) 编辑
摘要: 替换函数 replace(原字段,“原字段旧内容“,“原字段新内容“) update demo set name = replace(name,'医院','医2院') where name like '%医院%';update demo set name = replace(name,'医院','医 阅读全文
posted @ 2019-10-09 09:29 吴土炮Jared 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 1、instr()函数的格式 (俗称:字符查找函数) 格式一:instr( string1, string2 ) / instr(源字符串, 目标字符串) 格式二:instr( string1, string2 [, start_position [, nth_appearance ] ] ) / 阅读全文
posted @ 2019-10-09 09:22 吴土炮Jared 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 1、substr函数格式 (俗称:字符截取函数) 格式1: substr(string string, int a, int b); 格式2:substr(string string, int a) ; 解释: 格式1: 1、string 需要截取的字符串 2、a 截取字符串的开始位置(注:当a等于 阅读全文
posted @ 2019-10-09 09:15 吴土炮Jared 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 本文转自:https://www.cnblogs.com/harvey888/p/6771288.html 1 %TYPE说明 为了使一个变量的数据类型与另一个已经定义了的变量(尤其是表的某一列)的数据类型相一致,Oracle提供了%TYPE定义方式。当被参照的那个变量的数据类型改变了之后,这个新定 阅读全文
posted @ 2019-10-09 08:47 吴土炮Jared 阅读(414) 评论(0) 推荐(0) 编辑