Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem With Using The COLUMN Command

Re: Problem With Using The COLUMN Command

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Mon, 1 Nov 1999 15:17:48 GMT
Message-ID: <381DAF1C.CDCCE044@edcmail.cr.usgs.gov>


The COLUMN commands are not SQL statements. They are commands that are valid in SQL*Plus only. Server Manager and SQL Worksheet do not process these commands. Are you using SQL*Plus?

HTH,
Brian

wjramsey_at_hotmail.com wrote:
>
> 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 Mon Nov 01 1999 - 09:17:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US