create function is_date(p_date in varchar2)
return number
as
a date;
begin
a:=to_date(p_date,'yyyy-mm-dd');
return 1;
exception
when others then
return 0;
end;
/
select * from tabname where is_date(col_date)=1
return number
as
a date;
begin
a:=to_date(p_date,'yyyy-mm-dd');
return 1;
exception
when others then
return 0;
end;
/
select * from tabname where is_date(col_date)=1
解决方案 »
- 怎么查看别人有没有连我的数据库
- Oracle的严重Bug?
- 如何将数据从USER1导入USER2?
- [疑惑]ORACLE新手-请看这个简单的存储过程,为何不能插入数据呢?
- oracle 动态执行的sql语句中, insert into 中用多个union all 连接出来的语句效率高, 还是把union all分成多个insert into 效率高呢, 为什么?
- 请教DBA前辈们,关系型数据库还有前途吗?
- ####为什么相同的代码,第二次比第一次要快?####
- 在线等 in和exists的问题
- 在存储过程中怎么将游标 转化为 TClientDataSet.XmlData 的格式!
- 多表连接有时左表记录多有时右表记录多咋办
- 日期处理
- 求救!!!sos!!
return number
as
a date;
begin
a:=to_date(p_date,'yyyy-mm-dd');
return 1;
exception
when others then
return 0;
end;
/
select * from tabname where is_date(col_date)=1
一楼的没错