Hi. I have the following query:
- Format the columns
COLUMN employee_name HEADING 'Employee Name' FORMAT A20 WORD_WRAPPED
COLUMN project_name HEADING 'Project Name' FORMAT A20 WORD_WRAPPED
COLUMN hours_logged HEADING 'Hours' FORMAT 9,999
COLUMN dollars_charged HEADING 'Dollars|Charged' FORMAT $999,999.99
--Execute the query to generate the report
SELECT E.EMPLOYEE_NAME,
P.PROJECT_NAME,
SUM(PH.HOURS_LOGGED) hours_logged,
SUM(PH.DOLLARS_CHARGED) dollars_charged
FROM EMPLOYEE E,
PROJECT P,
PROJECT_HOURS PH
WHERE E.EMPLOYEE_ID = PH.EMPLOYEE_ID
AND P.PROJECT_ID = PH.PROJECT_ID
GROUP BY E.EMPLOYEE_ID, E.EMPLOYEE_NAME,
P.PROJECT_ID, P.PROJECT_NAME
When I execute this query it tells me that the column commands are
invalid SQL statements. If I cut them out it runs fine. If I copy the
column commands to another script and run it by itself it works fine.
It is only when they are together that it fails. I've tried to look in
several reference books and online and it seems fine.
What gives???
Thanks,
Joe
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 29 1999 - 13:29:27 CDT