informix到oracle移植---函数

   infomrix                    oracle                                                                              说明
month(date_expr)        to_number(to_char(date_expr,’MM’))                             返回相应月份
time                             to_char(sysdate,’hh24:mi:ss’)                                           返回当前时间
today                           sysdate                                                                            返回当前系统时间
weekday(date_expr)    to_number(to_char(date_expr,’D’)-1)                              返回指定日期是星期几,0表示星期日
year(date_expr)           to_number(to_char(date_expr,’YYYY’))                         返回指定日期对应
str[index1,index2]          substr(str,index1,len)                                                       Index1和index2在Informix中必须是常量,而Oracle中index1,len可以是变量
downshift(str)               lower(str)                                                                         返回小写字符串
upshit(str)                    upper(str)                                                                         返回大写字符串
length(str)                     length(str)                                                                         返回字符串长度
current                         sysdate                                                                             返回当前日期和时间
date(“12/13/1999”)     to_date(‘12/13/1999’, ’mm/dd/yyyy’)                               返回指定格式日期
day(dtime_expr)           to_number(to_char(dtime_expr,’dd’))                               返回指定日期是某月的第几天
extend(value[,first to last])   to_date(to_char(value, ’formate-mask’))                    调整日期时间精度
 
posted on 2007-11-23 17:35  巍巍边疆  阅读(997)  评论(2编辑  收藏  举报