Pregunta

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.

¿Fue útil?

Solución

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.)

Otros consejos

What are you trying to do with the "column clear" statement? If you're trying to clear formatting for a column, then you need to add the field name:

column field_name clear

If you're just trying to clear the column definitions, then you should reverse and try:

clear columns

Also, if the "column" statements are a part of the SELECT statement, then you shouldn't need to terminate them with a semi-colon.

column PeopleSoftTerms.LName HEADING 'PeopleSoft|Last Name'
SELECT  PeopleSoftTerms.LName,
...
FROM PeopleSoftTerms 
    INNER JOIN Domain ON PeopleSoftTerms.LName = Domain.LName AND  
               PeopleSoftTerms.FName = Domain.FName;

Give some of that a try, and see if it helps.

Try to add the "" on the blank character of last name:

column PeopleSoftTerms.LName HEADING 'PeopleSoft|Last" "Name'
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top