Hi all,
I am trying to write a web query in Visual InterDev which will return a
subset of records based upon user input (ie. A user will select the date
range for which he would like to see employee records). I am trying create
the SQL statement which will prompt for the start date and end date for the
range using the following statement:
SELECT EMPAUX.SUPERNO, LABOUR_HISTORY.EMPLOYEENO,
EMPLOYEES.SURNAME, EMPLOYEES.GIVEN_NAME,
LABOUR_HISTORY.TIMEDATE,
LABOUR_HISTORY.WORKORDERNO,
SUM(LABOUR_HISTORY.HOURS_WORKED)
AS SUMOFHOURS
FROM EMPAUX, EMPLOYEES, LABOUR_HISTORY
WHERE EMPAUX.EMPNO = EMPLOYEES.EMPLOYEENO AND
EMPLOYEES.EMPLOYEENO = LABOUR_HISTORY.EMPLOYEENO
GROUP BY EMPAUX.SUPERNO, LABOUR_HISTORY.EMPLOYEENO,
EMPLOYEES.SURNAME, EMPLOYEES.GIVEN_NAME,
LABOUR_HISTORY.TIMEDATE,
LABOUR_HISTORY.WORKORDERNO
HAVING (LABOUR_HISTORY.TIMEDATE >= TO_DATE(:FromDate:,
'MM/DD/YY')) AND
(LABOUR_HISTORY.TIMEDATE <= TO_DATE(:ToDate:,
'MM/DD/YY'))
ORDER BY EMPAUX.SUPERNO, LABOUR_HISTORY.EMPLOYEENO,
LABOUR_HISTORY.TIMEDATE
When I attempt to run this statement, I am prompted for the FromDate and
ToDate entries and I enter the correct format (10/25/99 and 10/31/99).
The response that I get back is ORA-01840 - Input value not long enough for
date format.
Is there anything that any of you can consider as being improper with the
way this statement is written?
Thanks in advance for all of your support.
Ashi Sheth
Applied Aerospace Structures Corp.