ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "PREPAID_USER.CREDO_TERMINAL_MONITORING", line 8
ORA-06512: at line 3
Я получаю эту ошибку, когда пытаюсь получить некоторую информацию из базы с датами МЕЖДУ. Всего я хочу получить все суммы от дд / мм / гггг 10:00 до дд + 1 / мм / гггг 10: 00
это мой код
create or replace package body CREDO_TERMINAL_MONITORING is
procedure get_terminal_amounts(v_terminal_name VARCHAR2,
v_start_date VARCHAR2,
v_end_date VARCHAR2,
o_cursor out sys_refcursor) is
begin
open o_cursor for
select SUM(e.amount / 100) as Amount,
SUM(d.commission_reseller_amount / 100)
from documents d
inner join ext_invoices e
on e.original_document = d.id
inner join terminals t
on d.terminal_id = t.id
inner join products p
on p.id = d.requested_product_id
inner join terminal_groups tg
on tg.id = t.terminal_group_id
inner join vw_prod_groups v
on v.id = p.id
inner join clients c
on c.id = d.client
where t.name = v_terminal_name
and e.incoming_date BETWEEN
TO_DATE(v_start_date, 'dd-mm-yyyy hh24:mi') AND
TO_DATE(v_end_date, 'dd-mm-yyyy hh24:mi')
and d.function_code = 865
order by d.system_time desc;
end CREDO_TERMINAL_MONITORING;