Question of to_date (to_date is very select, but not in where part)

Can someone help me on this

The following query gives the error "ORA-01841: (full) year must be between-4713 and 9999 and not 0.
Although the value of SCREEN_ENTRY_VALUE is ' 31/12/2008 00:00:00 ' is in the correct format with the to_date clause.
The same clause to_date works in the select part, but not in the place where a part of the query

' TO_DATE (SCREEN_ENTRY_VALUE, "YYYY/MM/DD HH24:MI:SS).


The Query------------------------------------------------------------------------------------------------------------------------
SELECT PEEF1. ASSIGNMENT_ID,
PETF1. ELEMENT_NAME,
PIV1.NAME,
SCREEN_ENTRY_VALUE,
TO_DATE (SCREEN_ENTRY_VALUE,
DATE1 "YYYY/MM/DD HH24:MI:SS")
OF PAY_ELEMENT_ENTRIES_F PEEF1,.
PAY_ELEMENT_LINKS_F PELF1,
PAY_ELEMENT_TYPES_F PETF1,
PAY_ELEMENT_TYPES_F_TL PETFT1,
PAY_ELEMENT_ENTRY_VALUES_F PEEVF1,
PAY_INPUT_VALUES_F PIV1
WHERE PEEF1. EFFECTIVE_START_DATE BETWEEN PEEF1. EFFECTIVE_START_DATE AND
PEEF1. EFFECTIVE_END_DATE
AND PEEF1. ELEMENT_LINK_ID = PELF1. ELEMENT_LINK_ID
AND PEEF1. EFFECTIVE_START_DATE BETWEEN PELF1. EFFECTIVE_START_DATE AND
PELF1. EFFECTIVE_END_DATE
AND PELF1. ELEMENT_TYPE_ID = PETF1. ELEMENT_TYPE_ID
AND PETF1. ELEMENT_NAME = "Prod pays."
AND PETF1. ELEMENT_TYPE_ID = PETFT1. ELEMENT_TYPE_ID
AND PETFT1. LANGUAGE = USERENV ('LANG')
AND PEEVF1. ELEMENT_ENTRY_ID = PEEF1. ELEMENT_ENTRY_ID
AND PEEF1. EFFECTIVE_START_DATE BETWEEN PEEVF1. EFFECTIVE_START_DATE AND
PEEVF1. EFFECTIVE_END_DATE
AND PEEVF1. INPUT_VALUE_ID = PIV1. INPUT_VALUE_ID
AND PIV1.NAME = 'Date won Overrides.
AND PEEF1. ASSIGNMENT_ID = 101
AND TO_DATE (DECEMBER 31, 2008"
'DD-MON-YYYY') BETWEEN PEEF1. EFFECTIVE_START_DATE AND
PEEF1. EFFECTIVE_END_DATE
AND TO_DATE (SCREEN_ENTRY_VALUE, "YYYY/MM/DD HH24:MI:SS) < trunc (sysdate) - which gives the error" ORA-01841: (full) year must be between-4713 and 9999 and not 0.
ORDER OF PEEF1. ASSIGNMENT_ID,
PETF1. ELEMENT_NAME,
PIV1.NAME;

change the condition of

AND TO_DATE (SCREEN_ENTRY_VALUE, "YYYY/MM/DD HH24:MI:SS)<>

TO

and SCREEN_ENTRY_VALUE< to_char(trunc(sysdate),="" 'yyyy/mm/dd="">

Tags: Oracle Applications

Similar Questions

Maybe you are looking for

  • Download constantly 'Firefox is not responding', but I am unable to reset it.

    Hello. My Firefox crashes constantly on. I get "Firefox does not. But I can't reset it. When I do, I always get the "well this embarrassing" error message.The error indicates that Firefox cannot be reset due to a tab open recently. But the only tabs

  • Free image fade

    I have a HP Deskjet F4180 printer. I want to print disk images coloured by joining a local club similar to the car tax discs, which could be placed in a car windshield. That would be the best ink and photographic paper to use as free as possible to f

  • My volume on Aspire 5942 g wheel does not work correctly.

    I had this problem for a long time, and I can't seem to find the answer anywhere. When I want to activate the sound upward or down, he turns the volume upward. I tried to install the drivers and of course the Launch Manager, but nothing seems to work

  • What is keyboard navigation? What is doing?

    What's doing navigation with the keyboard? How does it work? It is better that it is on or off?

  • 'Get link' the context menu element gone

    Why is that if you save a template with the template repository that corresponds to a url, your menu item appears and the default menu item "Get link" disappeared? JDE 4.5 8330 (Simulator) Default CDMA network