Home » Developer & Programmer » Reports & Discoverer » literal does not match format string (oracle9i)
literal does not match format string [message #409364] Mon, 22 June 2009 05:53 Go to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Begin
select to_charto(date(p_date,'MM/DD/RRRR HH:MI:SS AM')) into x_date from dual;
--select to_char(to_date(trunc(p_date),'RRRR/MM/DD HH24:MI:SS')) into x_date from dual;
DISPLAY_MESSAGES('log','After converting the date formats ------>'|| x_date);
Exception
When others then
DISPLAY_MESSAGES('log','Failed in converting dates ------>'||p_date);
DISPLAY_MESSAGES('log',sqlerrm);
End;


Getting error while passing parameter date to p_date
Kindly help me

Thank you
Aiyaz
Re: literal does not match format string [message #409367 is a reply to message #409364] Mon, 22 June 2009 05:58 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Begin
select to_char(to_date(p_date,'DD-MON-YYYY')) into x_date from dual;
--select to_char(to_date(trunc(p_date),'RRRR/MM/DD HH24:MI:SS')) into x_date from dual;
DISPLAY_MESSAGES('log','After converting the date formats ------>'|| x_date);
Exception
When others then
DISPLAY_MESSAGES('log','Failed in converting dates ------>'||p_date);
DISPLAY_MESSAGES('log',sqlerrm);
End;
Re: literal does not match format string [message #409393 is a reply to message #409364] Mon, 22 June 2009 07:40 Go to previous messageGo to next message
cookiemonster
Messages: 13959
Registered: September 2008
Location: Rainy Manchester
Senior Member
Presumably p_date is not in the format DD-MON-YYYY.
So what is the datatype of p_date?
What value do you pass in for p_date?
What is the datatype of x_date?
Re: literal does not match format string [message #409495 is a reply to message #409393] Mon, 22 June 2009 23:08 Go to previous messageGo to next message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

thanks for the reply

The issue got cleared. As i have taken p_date data type as date which has to be varchar2.

thanks
Aiyaz
Re: literal does not match format string [message #410313 is a reply to message #409393] Fri, 26 June 2009 02:32 Go to previous message
aiyaz_ma
Messages: 56
Registered: May 2009
Location: Hyderabad
Member

Hi

Can we only see items that have changed +/- 20% from the prior week. From what you said it should only print differences of over 20% plus or minus, but I'm seeing some that are the same quantity as the prior week.


Attached the Package Kindly help me in doing these changes

please give me some ideas

Thanks
Aiyaz
Previous Topic: Error A READ-ONLY bind variable used in OUT or IN-OUT context
Next Topic: Column name as parameter
Goto Forum:
  


Current Time: Sat Nov 30 06:16:01 CST 2024