Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Please Help: ORA-01847 for valid date

Please Help: ORA-01847 for valid date

From: wdewebserver <wdecember_at_freemail.absa.co.za>
Date: Tue, 22 Feb 2005 21:06:40 +0200
Message-ID: <AtOdnUAUlJcjH4bfRVn-jg@is.co.za>


Hi

I have written the following stored procedure hoping to extract data from a table. When I call the stored proc using a date like 10-11-2004, I get an error ORA-01847: day of month must be between 1 and last day of month.

Procedure "dynamic"
(
vTABLE_NAME IN CHAR,
vCREATED_DATE IN CHAR,
vREF_CURSOR OUT GLOA.RCT
)
AS
V_STRING VARCHAR2(1000);
BEGIN
    V_STRING := 'SELECT XRED, YFER FROM '||vTABLE_NAME||' '||     'WHERE CREATED_DATE = TO_DATE('||vCREATED_DATE||',''DD-MM-YYYY'')'

OPEN vREF_CURSOR FOR V_STRING;
END dynamic; Received on Tue Feb 22 2005 - 13:06:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US