错误:从Laravel执行查询时出现ORA-01858

时间:2015-12-05 13:08:10

标签: sql oracle11g laravel-5.1

我一直收到以下错误:

ORA-01858: a non-numeric character was found where a numeric was expected

每当我运行以下查询时:

insert into ZBH_EBUS_CAPPING_INBOUND (group_id, from_date, to_date, amount, period) values (31, TO_DATE('01/01/2015','DD/MM/YYYY'), TO_DATE('01/08/2015','DD/MM/YYYY'), 10.123, 2)

当我直接在SQL Developer上执行此查询时,它工作正常,但是当我通过Laravel执行此操作时它失败了。请帮忙。

1 个答案:

答案 0 :(得分:0)

检查您的日期格式 从DD / MM / YYYY到YYYY / DD / MM