添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
奔放的萝卜  ·  Spring Boot's new ...·  1 年前    · 
俊逸的石榴  ·  toString()、String.valu ...·  2 年前    · 
FUNCTION isdate (datestr VARCHAR2, format VARCHAR2) RETURN number IS
    p_date   DATE;
BEGIN
    SELECT TO_DATE (datestr, format)
    INTO p_date
    FROM DUAL;
    RETURN 1;
EXCEPTION
    WHEN OTHERS  THEN
       RETURN 0;
END;
into v_date from dual; return to_char( v_date , ' mm ' ) || ' 月- ' || to_char( v_date, ' yy ' ); elsif ( length(p_date) = 7 ) then select to_date (p_date, ' yyyy-mm ' ) into v_date from dual; return to_char( v_date , ' mm ' ) || ' 月- ' || to_char( v_date, ' yy ' ); elsif ( length(p_date) = 8 ) then select to_date (p_date, ' yyyymmdd ' ) into v_date from dual; return to_char(v_date, ' dd ' ) || ' - ' || to_char( v_date, ' mm ' ) || ' 月- ' || to_char(v_date, ' yy ' ); elsif ( length(p_date) = 10 ) then select to_date (p_date, ' yyyy-mm-dd ' ) into v_date from dual; return to_char(v_date, ' dd ' ) || ' - ' || to_char( v_date, ' mm ' ) || ' 月- ' || to_char(v_date, ' yy ' ); end if ; return ' 11-00月-00 ' ; exception when others then return ' 00-00月-00 ' ; end get_date_str; View Code

附录:参考资料

1. oracle中判断是否为日期/number格式

10 PostgreSQL 表级复制-物化视图篇, 支持异地,异构如 Oracle 到 pg 的物化视图|学习笔记
快速学习10 PostgreSQL 表级复制-物化视图篇,支持异地,异构如 Oracle 到 pg 的物化视图
从 Oracle/MySQL 到 PolarDB(二)| 学习笔记
快速学习从 Oracle/MySQL 到 PolarDB(二),介绍了从 Oracle/MySQL 到 PolarDB(二)系统机制, 以及在实际应用过程中如何使用。