0
有没有办法解决这个问题?我必须将日期作为输入并在PL-SQL过程中执行。Oracle日期格式问题
ref_d := '03042017';
select count(*) into count_num
from EGB_RDMS_RULE
where ref_d = to_date('03042017','DDMMYYYY'); -- This statement works
select count(*) into count_num2
from EGB_RDMS_RULE
where ref_d = to_date(ref_d,'DDMMYYYY'); -- This doesnt work
有人可以解释为什么第二种说法不起作用吗?
这些查询做了不同的事情。你想要代码做什么? “这不起作用”是什么意思? –
我想要第二个代码运行..我有一个变量输入是一个日期作为字符串..我想用它来过滤表中的值.. – thealchemist