Search code examples
oracleheading

column statement not working in Oracle


This is something easy - I know it. Been working for a couple of hours on it, googled it, no luck. Apologize in advance.

For some reason I can NOT alter the column heading using the column statement in Oracle.

Here is what I am running:

column clear;
column PeopleSoftTerms.LName HEADING 'PeopleSoft|Last Name';
SELECT  PeopleSoftTerms.LName,
        PeopleSoftTerms.FName as "PeopleSoft First Name", 
        TO_CHAR(PeopleSoftTerms.termdate, 'YYYY/MM/DD') as "Termination Date", 
        PeopleSoftTerms.ticket as "Maximo Ticket",
        PeopleSoftTerms.LANID as "ID Listed in PeopleSoft",
        Domain.logonid as "Active Directory ID", Domain.DisplayName, Domain.status
FROM PeopleSoftTerms 
     INNER JOIN Domain ON PeopleSoftTerms.LName = Domain.LName AND  
                PeopleSoftTerms.FName = Domain.FName;

I am at a loss here.


Solution

  • COLUMN commands take the column name only, not the fully qualified column name.

    core> column event heading "This will work"
    core> column v$session.event heading "This will not"
    core> select v$session.event from v$session where rownum=1;
    
    This will work
    ----------------------------------------------------------------
    VKTM Logical Idle Wait
    

    (This is in SQLPlus. I do not believe COLUMN is supported at all by SQL Developer.)