Home » SQL & PL/SQL » SQL & PL/SQL » how to run this query correctly? (11g)
icon5.gif  how to run this query correctly? [message #568478] Fri, 12 October 2012 02:40 Go to next message
vikashkrburnwal@gmail.com
Messages: 61
Registered: October 2012
Location: Bangalore
Member
Hi i am having one query which i want to run which is:

select shift_in, shift_out from masterprocessdailydata where PDate = TO_DATE('15-OCT-12 12:00AM','DD-MM-YY') AND Emp_ID = '00000001';
but getting this error:

SQL Error: ORA-01858: a non-numeric character was found where a numeric was expected
01858. 00000 - "a non-numeric character was found where a numeric was expected"
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.

how to execute this correctly.
Re: how to run this query correctly? [message #568480 is a reply to message #568478] Fri, 12 October 2012 02:45 Go to previous messageGo to next message
Michel Cadot
Messages: 58490
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please READ the links I mentioned you in your 2 previous topics.

Regards
Michel

[Updated on: Fri, 12 October 2012 02:45]

Report message to a moderator

Re: how to run this query correctly? [message #568481 is a reply to message #568480] Fri, 12 October 2012 02:47 Go to previous messageGo to next message
Michel Cadot
Messages: 58490
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And once more:

Michel Cadot wrote on Thu, 11 October 2012 13:48
v.ram81 gave you the solution.

Regards
Michel

Re: how to run this query correctly? [message #568485 is a reply to message #568481] Fri, 12 October 2012 03:17 Go to previous messageGo to next message
muralikri
Messages: 638
Registered: August 2011
Location: chennai
Senior Member

you have to use like..
'DD-Mon-YY HH:MI AM' 
Re: how to run this query correctly? [message #568486 is a reply to message #568485] Fri, 12 October 2012 04:35 Go to previous messageGo to next message
vikashkrburnwal@gmail.com
Messages: 61
Registered: October 2012
Location: Bangalore
Member
Hi sir,

i am using one variable in my stored procedure which is v_date1 date datatype.
and i have a column value which is workdate.
in workdate value is this format. 15-10-2012 and i am storing in v_date1 variable so while debugging value is showing in v_date like this: 15-OCT-12 12:00:00AM
And i am not able to fetching other value through this variable because value is different.

thanks

Re: how to run this query correctly? [message #568487 is a reply to message #568486] Fri, 12 October 2012 04:39 Go to previous message
Michel Cadot
Messages: 58490
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Copy and paste what you did and got.
But FIRST read the documentation, your problems have beed discussed in details in your 3 previous topics, you have been pointed to the correct section of the documentation, examples have been given to you.
You SHOULD be able to do it now, otherwise tell your boss you do not understand anything to SQL and PL/SQL and resign.

Regards
Michel
Previous Topic: How to get the time from datetime?
Next Topic: start previous col with 0
Goto Forum:
  


Current Time: Wed Jul 23 01:10:55 CDT 2014

Total time taken to generate the page: 0.09871 seconds