I have following error when I do :
INSERT INTO "CACHE" ("QUERY","RESULTS","ELAPSED")
VALUES(i_query_id,"TAB_RESULTS"(),("DATE_TO_NUMBER "(SYSDATE()) - "DATE_TO_NUMBER"(l_started)));

I have two different schemes with the same code and it works in one scheme, but doesnt work in another. is it oracle bug ?
Any help will be appreciated.

Cache definition :

CREATE TABLE CACHE
(
QUERY VARCHAR2(255) NOT NULL,
CREATED DATE DEFAULT SYSDATE NOT NULL,
ELAPSED NUMBER(11) DEFAULT 0 NOT NULL,
RESULTS TAB_RESULTS
)
NESTED TABLE RESULTS STORE AS RESULTS RETURN AS LOCATOR
NOLOGGING
CACHE
NOPARALLEL
/
with primary key on query.

TYPE "TAB_RESULTS" AS TABLE OF "RESULT"
TYPE "RESULT" AS OBJECT (
"DOC_ID" NUMBER(11),
"REL" NUMBER(11),
"TYPE" NUMBER(4)
)
;