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