Column alias for graph

Hi,
I have to display the project_value as Project Value in graph series in oracle reports 10g.
my column name is project_value it is exactly shown in report but i want to show as Project Value. If i give like "Project Value"(giving in sql*plus) its not accepting so in graph its shows with "_" as in block value.

I seem to remember that when you build the graph in Reports10g you can specify the column name in the graph. Havnt got the Report Builder with me at the mo so cant tell you more.
Dave

Similar Messages

  • Column alias for spatial column within cursor loop using dynamic SQL

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

  • Using column alias for calculations in same select list

    Hi All,
    I want to use a calculated column of query to create further calculated columns in same query using column alias. I have to do so because the calculation is too big to write it everytime.
    e.g.
    Select decode(Month, 1, Tran_January, 2, Tran_February, ....) as MonthTran,
    Month, Year,
    round(MonthTran/Intrest_rate, 2) as Amount <---(using previous alias)
    from ledger;
    Thanks in advance,
    Mona

    Probably the easiest way of doing this is to write an inline view, viz
    SELECT l.Month
           , l.Year
           , round(mt.MonthTran/l.Intrest_rate, 2) AS Amount
    FROM   ledger l
           , (SELECT x.pk_col, decode(Month, 1, Tran_January, 2, Tran_February, ....) AS MonthTran
              FROM ledger x) mt
    WHERE  l.pk_colunm = mt.pk_colunm
    ; If you have any criteria in a WHERE clause on ledger you shouldn't need to repeat them providing LEDGER does have a primary key column. You may need to tweak it a bit for performance, if LEDGER is a big table.
    Cheers, APC
    Cheers, APC

  • Column Alias for a pl/sql table

    CREATE OR REPLACE TYPE VARCHAR2_NTT IS TABLE OF VARCHAR2(16000);
    CREATE OR REPLACE function f_split_data(v_data_to_split IN varchar2,
    v_delimiter IN varchar2,
    v_position IN integer
    return varchar2
    as
    begin
    if v_position = 1
    then
    return substr (v_data_to_split,1,instr (v_data_to_split, v_delimiter, 1, 1) - 1);
    else
    return substr(v_data_to_split,instr (v_data_to_split, v_delimiter, 1, v_position-1) + 1,(instr (v_data_to_split,v_delimiter,1,v_position)-instr(v_data_to_split,v_delimiter,1,v_position-1)- 1));
    end if;
    end;
    SELECT *
    FROM TABLE
    CAST(pkg_common.fn_splitdata ('213~343~2343~2343~5453','~') AS varchar_ntt)
    Is it possible to have an alias for the column value coming out of this pl/sql table ? It would be useful to perform joins etc.,
    Rgds,
    Gokul

    Try
    SELECT column_value AS [alias goes here] FROM TABLE(...Urs

  • 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

  • Alias for Columns

    Hello,
    I am using Oracle Database 11g Enterprise Edition Release 11.1.0.6.0.
    I would like to have an Alias for my columns in a query.
    The main column value is a date like 201204 the Alias which should appear as column heading when the query is run should be like Apr-2012
    So I would like my output to be like
    Apr-12 May-12 Jun-12
    201204 201205 2012-06
    I am using a query like
    select '2001204'||' "'||to_char(to_date('201204','yyyymm'),'Mon-yy')||'"'
    from dual;
    This does not seem to give me the correct results. Am I doing something wrong ?
    Thanks
    fm

    IQ wrote:
    Hello,
    I am using Oracle Database 11g Enterprise Edition Release 11.1.0.6.0.
    I would like to have an Alias for my columns in a query.
    The main column value is a date like 201204 the Alias which should appear as column heading when the query is run should be like Apr-2012
    So I would like my output to be like
    Apr-12 May-12 Jun-12
    201204 201205 2012-06
    I am using a query like
    select '2001204'||' "'||to_char(to_date('201204','yyyymm'),'Mon-yy')||'"'
    from dual;
    This does not seem to give me the correct results. Am I doing something wrong ?
    Thanks
    fmThe names/datatypes/sizes and number of columns from a query is called the "projection" and is determined at parse time; therefore it cannot be determined by the data without using 2 passes of the data (one to determine what the projection should look like and a dynamic one to query the data again with that dynamically generated projection).
    Essentially what you are trying to do is abuse the SQL engine, and it is really something that is best done by reporting tools that query the data and then process it to format the output based on the data itself.
    {thread:id=2309172}

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

  • Interview questions on column alias

    Hi
    Interviewer asked me this question.
    Why do we need an alias for column and is it improving query performance?
    I said
    if we select columns with same name from different table, alias is useful but no way related to query performance.
    is it correct? Please explain me on alias topic

    925896 wrote:
    Hi
    Interviewer asked me this question.
    Why do we need an alias for column and is it improving query performance?
    I said
    if we select columns with same name from different table, alias is useful but no way related to query performance.
    is it correct? Please explain me on alias topicYou are correct, alias is not related to performance..

  • Question about the Cluster and Column width in Graphs in Illustrator CS2

    How do they relate to each other? How do the Percentages work together? Is there any information about how you can mathematically figure how much area each Cluster width takes. If you make a graph and make both the cluster and column widths 100%, the entire area is filled. If you make the Column width 50% the bar will sit exactly in the center of the Cluster width, but if you make the cluster width 75%, the bars move closer together.

    Gregg,
    The set of bars that represent each row of data in the graph spreadsheet is called a "cluster".
    Let's let
       W = the width of the whole area inside the graph axes
       R = the number of rows of data
       C = the number of columns of data
    Then the maximum potential space to use for each row of data is W/R. The cluster width controls how much of this potential space is assigned to each row. This cluster space is then divided by C, giving the maximum potential width of each bar. The maximum potential width for each bar is then multiplied by the column width percentage to get the actual width of each bar.
    So the actual width of each bar is ((W/R)*Cluster width)/C)*Column width
    The graphs illustrated below have three rows of data, with two columns each. The solid colored areas in the background have the same cluster width as the main graph, but they all have a column width of 100%. This lets you see more easily how the gradient bars that have a column width of 80% are using up 80% of their potential width.
    Notice that as the Cluster percentage gets lower, the group of bars that represent a row of data get farther apart, so that you can more easily see the "clumping" of rows. When the Cluster percentage is 100%, the columns within each row are no closer to each other than they are to the columns in other rows.
    As the Column percentage gets lower, the bars for each data value occupy less of the space within their row's cluster, so that spaces appear between every bar, even in the same row.

  • 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/

  • @Column alias possible?

    Hi all
    is there a way to define an alias for an entity column?
    I'd like to define a named querey in a super class. The 'where clause' of the EJB Query contains a field that has a certain functionality, but is not yet named (as this is the job of the subclass (developer)) - Anyhow, I'd like to prepare the query (cause it's all the same for every subclass) and use a columnname like 'defalutname' for the column I don't yet know the name of.
    Later when setting up the subclass entity, I'd define something like this:
    @Column( name = ..., ALIAS = "defaultname", ... )
    ... so the predefined queries would work with that entity.
    @Entity
    public class ... {
    @Column( name = "shortname", ALIAS = "defaultname",
    columnDefinition = "varchar(100) default ''",
    nullable = false, insertable = true, updatable = true )
    public java.lang.String getShortname() { return this.shortname; }
    Any ideas how to get this work?
    Ty in advance.

    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}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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);

  • Flexible column alias name?

    Hi
    Is that a way to assign the column alias name at run time.
    Example: I want to sums a column and label it based on the current year.
    For 2007, I should have:
    SELECT
    ‘A’
    ‘B’,
    ‘C’,
    sum(RESERVE_AMT) AS RESERVE_AMT_2007
    FROM table_name
    For 2006 I should have:
    SELECT
    ‘A’
    ‘B’,
    ‘C’,
    sum(RESERVE_AMT) AS RESERVE_AMT_2006
    FROM table_name
    For 2005 I should have:
    SELECT
    ‘A’
    ‘B’,
    ‘C’,
    sum(RESERVE_AMT) AS RESERVE_AMT_2005
    FROM table_name
    Etc.
    For some reason I need a sql (something like above) in the procedure to be run in each year and populate a column labeled the current year concatenated with a fix string such as RESERVE_AMT_2007.
    Thanks.

    I've just modify your code and see what it shows --
    SQL>
    SQL> Create or Rreplace Procedure PROC_EXECUTE(var_Year VARCHR2)
      2  lsql VaRCHAR2(4000);
    Create or Rreplace Procedure PROC_EXECUTE(var_Year VARCHR2)
    ERROR at line 1:
    ORA-00905: missing keywordThen i've corrected it and again execute it then it shows --
    SQL> BEGIN
      2 
      3  lsql = ' SELECT empno , ename RESERVE_AMT_ ' || var_year
      4  || ' FROM emp';
      5 
      6  execute immediate(lsql);
      7  END PROC_EXECUTE;
      8  /
    lsql = ' SELECT empno , ename RESERVE_AMT_ ' || var_year
    ERROR at line 3:
    ORA-06550: line 3, column 6:
    PLS-00103: Encountered the symbol "=" when expecting one of the following:
    := . ( @ % ;
    ORA-06550: line 6, column 1:
    PLS-00103: Encountered the symbol "EXECUTE"As because, you didn't use :=. Then i've corrected that one and again execute it and it shows --
    SQL>
    SQL> Create or replace Procedure PROC_EXECUTE(var_Year VARCHR2)
      2  lsql VaRCHAR2(4000);
      3  BEGIN
      4 
      5  lsql := ' SELECT empno , ename RESERVE_AMT_ ' || var_year
      6  || ' FROM emp';
      7 
      8  execute immediate(lsql);
      9  END PROC_EXECUTE;
    10  /
    Warning: Procedure created with compilation errors.
    SQL>
    SQL>
    SQL> sho errors;
    Errors for PROCEDURE PROC_EXECUTE:
    LINE/COL ERROR
    2/1      PLS-00103: Encountered the symbol "LSQL" when expecting one of
             the following:
             ; is with authid as cluster order using external
             deterministic parallel_enable pipelined
             The symbol "is" was substituted for "LSQL" to continue.I've to correct two places and then ---
    SQL>
    SQL> Create or replace Procedure PROC_EXECUTE(var_Year IN VARCHAR2)
      2  is
      3  lsql VaRCHAR2(4000);
      4  BEGIN
      5 
      6  lsql := ' SELECT empno , ename RESERVE_AMT_ ' || var_year
      7  || ' FROM emp';
      8 
      9  execute immediate(lsql);
    10  END PROC_EXECUTE;
    11  /
    Procedure created.And, now i execute it and it shows --
    SQL>
    SQL> exec PROC_EXECUTE('TRY');
    BEGIN PROC_EXECUTE('TRY'); END;
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SCOTT.PROC_EXECUTE", line 9
    ORA-06512: at line 1My request to you - before put any solution please check the basic structure of your solution.
    Regards.
    Satyaki De.
    N.B: If you don't provide proper structure - it might be a hectic solution for the user, too. Don't mind. I know you want to help the user - i mean your motive is good. But, still you should understand. Be positive. Hope you don't mind. With best regards.

  • ORA-00998: must name this expression with a column alias

    Dear all,
    create table mebs_temp10 tablespace mebs_tempt nologging as SELECT TRUNC(meddate) as meddate, ctype , btext btext, COUNT (1), sum(duration/60), SUM (bamount) FROM mells.hcalls WHERE meddate >= '01-JAN-2009' and meddate < '01-MAY-2009' GROUP BY meddate, ctype, btext
    ERROR at line 1:
    ORA-00998: must name this expression with a column alias
    I tried giving a alias for the columns ctype , btext .. but helpless. which column to be aliased ?
    Kai

    Try this...
    create table
    mebs_temp10 tablespace mebs_tempt nologging as
    SELECT
    TRUNC(meddate) as meddate,
    ctype,
    btext btext,
    COUNT (1) count_field,
    sum(duration/60) sum_duration,
    SUM (bamount) sum_bamount
    FROM mells.hcalls WHERE meddate >= '01-JAN-2009' and meddate < ' GROUP BY meddate, ctype, btext

  • Creating Alias for command which contains two piped cmdlet

    hi friends
    i use powershell 4.0. is it possible to create Alias for cmdlet which is piped to another cmdlet?
    i need to use this command frequently:
    Get-windowsFeature | select-object name     ( to see only "name" column)
    i checked & non of the following commands works:
    new-alias myalias Get-windowsFeature | select-object name
    or
    new-alias myalias "Get-windowsFeature | select-object name"
    any solution please?
    thanks in advanced

    You can't do that with an alias, it only works to substitute the name of a cmdlet or function, and takes a string value as it's argument.  You can accomplish the same effect with a function, which takes a script block argument:  
    function myalias {Get-windowsFeature | select-object name}
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
    hi mjolinor
    Great guide. really thanks for that. it was exactly what i needed.
    best regards

Maybe you are looking for

  • Intel GMA 950 direct rendering: no

    Hi I've a problem with my Intel GMA 950 this is my glxinfo output name of display: :0.0 display: :0 screen: 0 direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) server glx vendor string: SGI server glx version string:

  • Add a value from a list column on a page

    Hi, I am trying to create a help workflow for the users in my organization. My idea is that when a user clicks for help they will get a page describing different questions like below that will display their relevant data. There would be a master list

  • EXEC SQL / EXECUTE PROCEDURE

    Hi, I´ve been asked to develop a program that should be run in background as a job. The aim of this program is to select certain data from SAP an then pass it to a DB (sql) outside SAP so that this DB always gets the most updated data. I´ve already s

  • HT1212 How do I change owner name and profile to iPad I just traded up for a new iPad Air?

    I just bought a new iPad Air and wish to give my old iPad 2 to my brother. How do I delete my owner profile and appropriate data, and reset the old iPad to his owner name & profile?

  • WebService Questions?

    I'm using JDev 10.1.3.1 to create my first web service - I was able to successfully consume a web service provided by an external .NET application, and now I'm trying to create a web service to be consumed by that same external application. I'm follo