Hello All:
I am getting the following error message:
ORA-01830: date format picture ends before converting entire input string Error detected at position #:1706
when I run SQL like this simplified pseudo-code:
SELECT FIELD_AA, FIELD_BB
FROM (SELECT FIELD_A AS FIELD_AA, FIELD_B AS FIELD_BB
FROM TABLE_A, WHERE FIELD_A = 'SomeValue' AND FIELD_X IS NOT NULL
UNION
SELECT (FIELD_A AS FIELD_AA, FIELD_B AS FIELD_BB
FROM TABLE_A, WHERE FIELD_A = 'SomeValue' AND FIELD_Y IS NOT NULL)
WHERE FIELD_A BETWEEN TO_DATE('06/01/02', 'MM/DD/YY' ) AND TO_DATE('07/16/02', 'MM/DD/YY' )
The problem is using the BETWEEN statement with the UNION statement, because when I run the code without the UNION statement, it runs fine. I have also tried using < and > to frame the dates, but I still get the same error. Is there another way to get data in between dates without using the BETWEEN statement or the <> signs?
Thanks in advance!
I am getting the following error message:
ORA-01830: date format picture ends before converting entire input string Error detected at position #:1706
when I run SQL like this simplified pseudo-code:
SELECT FIELD_AA, FIELD_BB
FROM (SELECT FIELD_A AS FIELD_AA, FIELD_B AS FIELD_BB
FROM TABLE_A, WHERE FIELD_A = 'SomeValue' AND FIELD_X IS NOT NULL
UNION
SELECT (FIELD_A AS FIELD_AA, FIELD_B AS FIELD_BB
FROM TABLE_A, WHERE FIELD_A = 'SomeValue' AND FIELD_Y IS NOT NULL)
WHERE FIELD_A BETWEEN TO_DATE('06/01/02', 'MM/DD/YY' ) AND TO_DATE('07/16/02', 'MM/DD/YY' )
The problem is using the BETWEEN statement with the UNION statement, because when I run the code without the UNION statement, it runs fine. I have also tried using < and > to frame the dates, but I still get the same error. Is there another way to get data in between dates without using the BETWEEN statement or the <> signs?
Thanks in advance!