Quote q' and column alias'

Hi, I know I can do the following...
select q'[The job Id for the ]'||job_title||q'['s is ]'||job_id "q[]" from jobs;
but if I attempt to add an alias it fails with ora-00923 From keyword...
select q'[The job Id for the ]'||job_title||q'['s is ]'||job_id "q[]" as "Job Description" from jobs;
Is this possible or not?
Thanks.
James.

Hi,
James Gordon wrote:
Hi the q'[ is to define a different quoting character to allow imbedded quotes rather then using two single quotes.
So rather than 'President''s' I can write q'[President's]' "q[]".Not exactly. Instead of
'President''s'you can write
q'[President's]'Nothing more is required. When a string literal is preceded by Q, the first character after the opening single-quote (or its mirror-image, if it has one, as it does in this case) will be expected to end the string.
If you add "q[]" after that,
q'[President's]'   "q[]"it's equivalent to saying
q'[President's]'   AS "q[]"The keyword AS is optional before column aliases.
I wanted to see if you can combine the second example with alising the column at the same time.Since "q[]" is already an alias, the answer is no, because a column can have only one alias.
I realise that it might look like an alias.The reason why it looks like an alias is because it is an alias. What is "q[]", if not an alias?
If you want the alias to be "Title" (capital T, then all small letters) then say
SELECT  q'[President's]'   AS "Title"
FROM    dual;

Similar Messages

  • Quotes in a column alias

    Possible to have double quotes in a column alias in a SQL projection? Long story involving Apex, Anychart v5 and how Apex names data serie in XML generated for multiple Y axis.
    This problem can be easily solved if I can add a double quote into a column alias. E.g.
    select
      some_col as "COL1"" param1=123"
    from dualNo comment about Apex using column labels for generating XML tag name-values... {noformat} ;-) {noformat}
    Of course, the SQL parser does not like the above format at all.
    Had a look at the SQL Reference guide and it does not say much in this regard. Seems like there's no workaround - correct?

    Hi,
    I can't think of any way to do that in SQL.
    In SQL*Plus, you can use COLUMN ... HEADING, with doubled double-quotes:
    COLUMN     dummy     FORMAT     A20     HEADING     "COL1"" param=123"
    SELECT     *
    FROM     dual;Output:
    COL1" param=123
    X
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to resolve unresolved column error when we change column name in BMM Layer and removed alias in presentation layer

    how to resolve unresolved column error when we change column name in BMM Layer and removed alias in presentation layer

    Looks like the presentation column got Alias before your BMM changes, so in your case renaming logical column and deleting alias is not good to go.
    Keep Alias

  • How to extract member, default alias and custom alias into separate columns

    Hi,
    is there a way to get simultaneously member name, default alias name and custom alias name with Essbase 9x report scripts (Report Writer)?
    I do know that using for example
    <OUTALTSELECT "default or custom alias table"
    <REPMBRALIAS "dimension"
    I can get both the real member name and selected alias table, but the problem is that they're both returned to same column.
    Using fix columns and order I can repeat member name into several columns if needed, but I would need to tell what to put for each column.
    For example : { ORDER 0,0,0,1,2,3,4,5 FIXCOLUMNS 8 }
    I would like to force the report script to put Member name into first column in row, default alias name of member into second column in row and custom alias name of member into third column in row, like :
    MEMBERNAME DEFAULTALIASNAME CUSTOMALIASNAME
    Any ideas how to handle this?
    I can of course create several extracts containing one sort of info per list, but it would make life somewhat easier having all of these in same extract.
    Thanks in advance!
    Br,
    MK

    Hi,
    well, that's pretty much what I want to achieve, to get all info of member within same row, but into separate columns.
    The other option is to then produce 2 other extracts containing:
    Extract 1:
    MEMBERNAME DEFAULTALIASNAME
    and
    Extract 2:
    MEMBERNAME CUSTOMALIASNAME
    These values should be in separate columns?
    I think I lost the track while playing around with report writer, does anyone have a ready made solution for this?
    <REPMBRALIAS brings the needed info, but returns the values into same column.
    Empty space delimiter could be handled with customalias table, but in this case default alias name may have long text with several empty spaces making it hard to sort in the other system side.
    Any suggestions?
    Thanks so far for your kind help.
    Br,
    MK

  • Column alias error in a query of views

    Hi
    I was trying to workout this query
    create view dept_sal as
    select d.department_name,sum(e.salary)
    from departments d left outer join employees e
    on d.department_id= e.department_id
    group by d.department_name;
    and i recieved this error message .............
    Error at Command Line:2 Column:25
    Error report:
    SQL Error: ORA-00998: must name this expression with a column alias
    00998. 00000 - "must name this expression with a column alias"
    *Cause:   
    *Action:
    I tried to put an alias for sum(e.salary) function and it worked but i dont understand why it is required or is the problem somewhere else and why an alias is needed here ???
    Actually the book hasnt specfied the need for an alias at this place ...so i wanted to know why am getting this error ..
    create or replace view dept_sal as
    select d.department_name,sum(e.salary) as d_sal
    from departments d left outer join employees e
    on d.department_id= e.department_id
    group by d.department_name;
    view DEPT_SAL created.
    Also i wanted to know if i can start a thread each time i want have a problem or can i add my questions to somebody
    else's thread ..
    Thanks
    Jayshree

    Hi, Jayshree,
    to_learn wrote:
    Hi
    I was trying to workout this query
    create view dept_sal as
    select d.department_name,sum(e.salary)
    from departments d left outer join employees e
    on d.department_id= e.department_id
    group by d.department_name;
    and i recieved this error message .............
    Error at Command Line:2 Column:25
    Error report:
    SQL Error: ORA-00998: must name this expression with a column alias
    00998. 00000 - "must name this expression with a column alias"
    *Cause:   
    *Action:
    I tried to put an alias for sum(e.salary) function and it worked but i dont understand why it is required or is the problem somewhere else and why an alias is needed here ???Every column in a table or view must have a unique name. If you don't explicitly specify a name for the output column, Oracle will try to generate one based on the input expression. If the name does not follow the normal rules for identifiers (one of which is that the name can't contain special symbols, like parentheses) then the name must be enclosed in double-quotes.
    Notice that these rules are a little different from the rules about result sets. In the result set of a main query, for example, column names do not have to be unique, and a system-generated name like 'SUM(E.SALARY)" is acceptable.
    Actually the book hasnt specfied the need for an alias at this place ...so i wanted to know why am getting this error ..I can't see which book you're reading. Post a quote. If the book is available on line, post a link, too.
    create or replace view dept_sal as
    select d.department_name,sum(e.salary) as d_sal
    from departments d left outer join employees e
    on d.department_id= e.department_id
    group by d.department_name;
    view DEPT_SAL created.That's the right way to do it.
    Also i wanted to know if i can start a thread each time i want have a problem or can i add my questions to somebody
    else's thread ..It's better to start your own thread.

  • Column alias declaration in package.

    Hi,
    <br><br>
    OS - XP
    <br><br>
    Version - Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    <br><br>
    How do I declare a column alias in a cursor?
    <br><br>
    I have the following in a package procedure and get the following error
    <br><br>
    Error(107,35): PLS-00302: component 'EMAIL_FROM' must be declared
    <br><br>
    I have hilighted what I assume is the offending lines, but the error is pointing to the lines in bold italics towards end of code.
    <br><br>
      FOR c2 IN
        (SELECT b.eml_id
              , a.email "email_from"
    , to_address.email "email_to"
              , to_address.subject
              , to_address.header
              , to_address.footer   
           FROM mySchema.table_1 a
          HTMLDB_MAIL.SEND(p_to   => c2.email_from  
                         , p_from => c2.email_to
    ...<br><br>
    Thank You<br>
    Ben
    Message was edited by:
    Benton

    You dont need double quotes " "
    (SELECT b.eml_id
              , a.email email_from
              , to_address.email email_to
              , to_address.subject
              , to_address.header
              , to_address.footer   
           FROM mySchema.table_1 a    
              , mySchema.table_4 b
              , mySchema.table_5 c
              , (SELECT e.eml_id          

  • Table and columns in small caps!

    Dear All,
    My database is 11gR2 and Linux is the OS.
    One of my application, whose code I am unable to access, it trying to insert records in Oracle database. The problem is that application is case sensitive and try to find table name and columns in small caps, while it gets upper case from Oracle and give error or invalid identifier.
    Is there any option to create table and fields with small letters.
    Kindly help.
    Regards,
    Imran

    misterimran wrote:
    ...The problem is that application is case sensitive and try to find table name and columns in small caps...What application could look for tables/columns in small caps ? As stated above, creating tables/columns enclosed by double quotes might help, but that'd mean the code must use double quotes everywhere...
    while it gets upper case from Oracle and give error or invalid identifier. It get as is, please show the error.
    Nicolas.

  • Special Characters and spaces in Tablenames and Column Names are allowed ?

    Hi
    I have created two tables in Oracle10g
    as follows
    SQL> create table test(columna number,columnb varchar2(20),primary key(columna));
    Table created.
    SQL> insert into test values(1,'test');
    1 row created.
    SQL> commit;
    COMMIT är utfört.
    SQL> create table "test quote"("#" number,abc number,primary key("#"));
    Table created.
    SQL> insert into "test quote" values(1,2);
    1 row created.
    SQL> commit;
    COMMIT är utfört.
    SQL> select * from "test quote";
    # ABC
    1 2
    SQL> select * from test;
    COLUMNA COLUMNB
    1 test
    Now I want to cache the tables and their data into TimesTen
    The cache group for table test which is not having any spaces and special characters in table name and column names is created perfectly.
    But when I create the cache group for table "test quote" which is having special characters and spaces it gives error :
    Command>create readonly cache group w2 from testuser.test(columna number,columnb varchar2(20),primary key(columna));
    Command>select * from test;
    <1,test>
    1 row found.
    Command>create readonly cache group w3 from testuser."test quote"("#" number,abc number,primary key("#"));
    5140: Could not find TESTUSER.TEST QUOTE in Oracle. May not have privileges.
    Command Failed.
    Now there is contradiction that why cache group for table test is created successfully and why it is not being created for table "test quote".
    What I think is if special characters and spaces in column names and table names are possible in Oracle then it sould be possible in TimesTen.
    Any possible solution.
    Looking forward for your reply.
    Please help I am stuck badly.
    /Ahmad

    Hi
    Problem Solved ....... Remeber only Capital letters work with special characters ......
    /Ahmad

  • Comma in report column alias breaking PDF Printing?

    It appears that some (but not all) special characters (e.g., a comma) in a report column alias causes an error when using PDF printing under "Print Attributes" for reports.
    This query works fine:
    select sysdate as "Date Today" from dual
    But the query below causes the error "Adobe could not open 'report[1].pdf' because it is either not a supported file type or because the file has been damaged...":
    select sysdate as "Date, Today" from dual
    Does anyone know a work-around? My real alias is "Lastname, Firstname" so I would like to keep the comma!
    We're using APEX 3.0.1 and PDF printing with Apache FOP.
    Thanks ahead of time.
    Cindy

    Hi Cindy,
    why not use the "Heading" property of a report column to show a speaking column heading? The column alias isn't really intended for that purpose.
    Set the "Heading Type" to "Custom" then you are able to change them for each column.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • Relational Diagram not showing Views column alias (R3.3)

    This seems to be a change as well? When I build views I often alias the columns in the view query builder. I would like the diagram to show those alias names rather than the name of the underlying column. Otherwise I have to look at the DDL to see if I got the names the way I want them.
    In previous version I thought it showed me the alias (I could be wrong?)

    Hi Kent,
    I logged a bug for that. It was added support for view header and unfortunately alias was lost.
    here is a script you can use to copy alias to header alias. If you have header alias for all columns then header will be included in generated DDL for that view.
    Philip
    views = model.getTableViewSet().toArray();
    for(var i=0;i<views.length;i++){
         cols = views.getElementsCollection().toArray();
         for(var k=0;k<cols.length;k++){
              col = cols[k];
              if("".equals(col.getHeaderAlias()) && !"".equals(col.getAlias())){
                   col.setHeaderAlias(col.getAlias());
                   views[i].setDirty(true);

  • Alternative to Column alias in a Where clause

    This question is related to earlier thread: https://forums.oracle.com/thread/2578735
    The below query gives me millions of records which is unacceptable from performance point of view. I am only interested in Tickets that are closed in a particular week. I cannot use closed_date in the inner query as closed_date >= '08/18/2013' AND closed_date < '08/24/2013' because close_date is column alias. I can't put it in the where condition of parent query because it makes no sense because by the time control raches to WHERE condition of parent query the subquery would have already fetched millions of records.
    Any alternative to this?
    SELECT  b.ticket_id, b.ticket_status, b.created_date, b.closed_status, b.closed_date 
      FROM 
      (SELECT  ticket_id, ticket_status, created_date, lead(ticket_status) over (partition BY ticket_id order by created_date) AS closed_status, lead(created_date) over (partition BY ticket_id order by created_date) AS closed_date 
      FROM cc_ticket_history 
      WHERE ticket_status IN ('NEW', 'REOPENED', 'CLOSED')                                   /* AND closed_date >= '08/18/2013' AND closed_date < '08/24/2013'      gives error */
      ) b 
      WHERE b.ticket_status != 'CLOSED' and b.closed_status = 'CLOSED                 /*AND b.closed_date >= '08/18/2013' AND b.closed_date < '08/24/2013'     -- makes no sense */';
    Ticket_ID
    TICKET_STATUS
    CREATED_DATE
    CLOSED_STATUS
    CLOSED_DATE
    D21207155
    NEW
    06/28/2013 17.28.59.000000000
    CLOSED
    06/28/2013 18.54.23.000000000
    D21207155
    REOPENED
    07/02/2013 19.55.04.000000000
    CLOSED
    07/02/2013 23.06.16.000000000

    Ora-aff wrote:
    Point Noted.
    It's not just a point, it's a fundamental bug in the code.
    Consider this...
    SQL> ed
    Wrote file afiedt.buf
      1  select 'Wrong' from dual
      2* where '03/18/2012' > '02/15/2013'
    SQL> /
    'WRON
    Wrong
    Comparing strings is not the same as comparing dates.
    SQL> ed
    Wrote file afiedt.buf
      1  select 'Wrong' from dual
      2* where to_date('03/18/2012','MM/DD/YYYY') > to_date('02/15/2013','MM/DD/YYYY')
    SQL> /
    no rows selected

  • Problem with column alias: Unknown column 'avg_rating' in 'where clause'

    Hello,
    I have a basic sql statement as follows:
    SELECT
    e.establishment_id,
    e.establishment_name,
    avg(r.rating) avg_rating
    FROM
    establishment e,
    rating r,
    comment com,
    establishment_country ec,
    country_ref cou
    where
    etc...
    and avg_rating >= 1
    and 0=0
    group by e.establishment_id
    order by e.establishment_idI have used a column alias for "avg(r.rating)" and named it "avg_rating".
    It works in my Mysql Query browser without problem but when I run it from Java I get this:
    java.sql.SQLException: Unknown column 'avg_rating' in 'where clause'
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
        at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
        at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
        at arcoiris.SearchSessionBean.performSearch(SearchSessionBean.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
        at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
        at org.jboss.ejb.Container.invoke(Container.java:873)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
        at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
        at $Proxy172.performSearch(Unknown Source)
        at arcoiris.SearchManagedBean.performSearch(SearchManagedBean.java:171)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
        at javax.faces.component.UICommand.broadcast(UICommand.java:312)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)Can anyone help please?
    Thanks in advance,
    Julien Martin.

    I am having the similiar problem, the query in java creator IDE works fine after i upgraded the J-connector and changed DataSource type for MySQL to mysql-connector-java-5.0.4-bin.jar. but still i cannot bind any control in the form to the aliased column. this is really frustrating. can anyone from Sun Developer explain?
    THX

  • Database column alias problem

    When joining the firstname and surname fields in my inital SQL query of my interactive report i.e
    INITCAP(INDSNAME)||' '||INITCAP(INDFNAME) AS FULLNAME,
    When clicking through to the record detail page I am getting the following error from the page item where in the source I am specifying FULLNAME under Source value or expression
    Column FULLNAME not found in table MYTABLENAME
    How can I get around this?
    Many Thanks

    Hi Bas
    Thanks - it will just be a view as basically I just want to print the data via jasper
    In my IA report under column attributes there is one called FULLNAME which is derived from INITCAP(INDSNAME)||' '||INITCAP(INDFNAME) AS FULLNAME,
    So how can I get the data displayed in the FULLNAME column in the IA report into a single record view.  At the moment my IA report the Link Column is currently linked to a 'Link to custom target'
    the target is a 'Page in this Application'  in this case page 9
    and in Item1 under Name the value is P9_ROWID and the value is #ROWID#
    Database column alias problem 

  • Group by with column alias does not work?

    Hello,
    The column alias is not working in the group clause?
    select col1,col2-col3 "col23", sum(col4)
    from table1
    group by col1,col23
    Error is col23 is invalid identifier.
    Thank you.

    I guess it's the double quotes around bonus:
    SQL> select empno, deptno, sum(bonus)
      2  from
      3  (
      4     select empno, (sal + 500) bonus, deptno
      5     from emp
      6  )
      7  group by empno, deptno
      8  ;
                   EMPNO               DEPTNO           SUM(BONUS)
                    7900                   30                 1450
                    7369                   20                 1300
                    7499                   30                 2100
                    7521                   30                 1750
                    7566                   20                 3475
                    7654                   30                 1750
                    7698                   30                 3350
                    7782                   10                 2950
                    7788                   20                 3500
                    7839                   10                 5500
                    7844                   30                 2000
                    7876                   20                 1600
                    7902                   20                 3500
                    7934                   10                 1800
    14 rows selected.

  • Report Query w. Column Alias issue?

    I have this query:
    SELECT
    TXI_IS_PROJECTS.PROJECT_NAME,
    TXI_IS_PROJECTS.PROJECT_DESC,
    TXI_IS_PROJECTS.PROJECT_SIZE,
    TXI_IS_PROJECTS.PROJECT_STATUS,
    (select NLS_INITCAP(name_f || ' ' || name_l) name from TXI_PEOPLE where userid= TXI_IS_PROJECTS.PROJECT_OWNER),
    TXI_IS_PROJECTS.SYSTEM_OWNER,
    TXI_IS_PROJECTS.CREATE_DATE,
    TXI_IS_PROJECTS.SPEC_REVIS,
    TXI_DOCUMENTS.NAME
    FROM TXI_IS_PROJECTS
    INNER JOIN TXI_DOCUMENTS ON TXI_DOCUMENTS.PROJECT_ID = TXI_IS_PROJECTS.PROJECT_ID
    INNER JOIN TXI_DOCUMENT_SIGNOFF ON TXI_DOCUMENT_SIGNOFF.DOC_ID = TXI_DOCUMENTS.ID
    WHERE TXI_DOCUMENT_SIGNOFF.SIGN_OFF_ID = :P9_SIGN_OFF_ID;
    The issue with this line:
    (select NLS_INITCAP(name_f || ' ' || name_l) name from TXI_PEOPLE where userid= TXI_IS_PROJECTS.PROJECT_OWNER),
    It's giving me this error:
    query column #5 ((SELECTNLS_INITCAP(NAME_F||''||NAME_L)NAMEFROMTXI_PEOPLEWHEREUSERID=TXI_IS_PROJECTS.PROJECT_OWNER)) is invalid, use column alias
    I've tried various ways and it's still not working.

    SELECT
      TXI_IS_PROJECTS.PROJECT_NAME,
      TXI_IS_PROJECTS.PROJECT_DESC,
      TXI_IS_PROJECTS.PROJECT_SIZE,
      TXI_IS_PROJECTS.PROJECT_STATUS,
      (select NLS_INITCAP(name_f || ' ' || name_l) name
       from TXI_PEOPLE
       where userid= TXI_IS_PROJECTS.PROJECT_OWNER) as "My Column",
      TXI_IS_PROJECTS.SYSTEM_OWNER,
      TXI_IS_PROJECTS.CREATE_DATE,
      TXI_IS_PROJECTS.SPEC_REVIS,
      TXI_DOCUMENTS.NAME
    FROM TXI_IS_PROJECTS
      INNER JOIN TXI_DOCUMENTS ON TXI_DOCUMENTS.PROJECT_ID = TXI_IS_PROJECTS.PROJECT_ID
      INNER JOIN TXI_DOCUMENT_SIGNOFF ON TXI_DOCUMENT_SIGNOFF.DOC_ID = TXI_DOCUMENTS.ID
    WHERE TXI_DOCUMENT_SIGNOFF.SIGN_OFF_ID = :P9_SIGN_OFF_ID;<br>
    as "My Column"<br><br>
    I just recreated it and that worked.<br><br>
    chet

Maybe you are looking for