No Column Names in 'Column Alias' Configuration
I have a column alias action following a transaction call. I'd like to rename the XML columns coming out of the call. A Tracer on the transaction call output shows columns but when I configure the Column Alias action, no columns appear in the drop down lists.
Any ideas?
Never Mind - I didn't have a reference document assigned correctly. It works now.
Similar Messages
-
Issue with Column Alias Name in a SELECT statement
I am trying to run sql query(IN ORACLE) to get the data from a remote database(TERADATA). The query is
select (table1.exp_date - table1.setup_date) AS day_diff,
CASE
WHEN day_diff = '0'
THEN 'YES'
WHEN day_diff > '0'
THEN 'NO'
ELSE 'Unknown'
END AS alias_type
from table1@remote_database_name;
The query is running fine when I run it in TERADATA environment directly without the remote database link since it is not necessary. If I run the above query in Oracle I am getting an error ORA-00904: invalid identifier.(this error is pointing to day_diff alias name)
Can anyone help me with this?
ThanksThe Column alias can be used in the ORDER BY clause, but not other clauses,like WHERE clause, in the query.
Use..
select (table1.exp_date - table1.setup_date) AS day_diff,
CASE
WHEN (table1.exp_date - table1.setup_date) = '0'
THEN 'YES'
WHEN (table1.exp_date - table1.setup_date) > '0'
THEN 'NO'
ELSE 'Unknown'
END AS alias_type -
Hi All,
can we use the column alias name in expression in a select query?
example,
select (10+20) as col1, (col1+30) as col2 from dual;
when i execute the above query, i am getting "col1 is invalid identifier".
can please some one answer to my query OR is there any other way to get the answer to my query?As you found out, you can't do it that way... What you can do is something like
select (col1+30) as col2
from (select 10+20 as col1
from dual
) -
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 ?
KaiTry 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 -
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
JayshreeHi, 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 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} -
Column alias results in ORA-00972
Hi,
I am using Eclipselink v1.0.2 on glassfish.
I have a query where I have set the maxResults to 1 like so:
this.entityManager.createQuery("SELECT t FROM Tbl t where t.name='271040300018**'")
.setMaxResults(1)
.getResultList();
The resultant query contains a column alias that has more than 30 characters which causes an ORA-00972 error. I've noticed that if I don't call setMaxResults the query does not contain aliased column names. Is there a way to either make sure that the query generator does not generate invalid column names or get it to not alias columns when I have a result set limit?
Thanks,
Drew
Edited by: user10816727 on Jan 27, 2009 1:02 PMHere is the generated query with the problematic aliases bolded. Note that I cannot change the length of the non aliased column names as a workaround.
Thanks,
Drew
SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum FROM (SELECT new_drug_status AS new_drug_status1, message AS message2, message_stop_date AS message_stop_date3, termination_date AS termination_date4, cms_drug_status AS cms_drug_status5, drug_status_ovrd AS drug_status_ovrd6, min_rx_qty AS min_rx_qty7, max_rx_qty AS max_rx_qty8, min_rx_days AS min_rx_days9, max_rx_days AS max_rx_days10, max_dose AS max_dose11, min_age AS min_age12, max_age AS max_age13, min_age_dob_opt AS min_age_dob_opt14, max_age_dob_opt AS max_age_dob_opt15, sex_restriction AS sex_restriction16, qty_dsup_compare_rule AS qty_dsup_compare_rule17, max_qty_over_time AS max_qty_over_time18, rx_qty_opt_multiplier AS rx_qty_opt_multiplier19, specialty_drug_ind AS specialty_drug_ind20, ssb_copay_tier AS ssb_copay_tier21, msb_copay_tier AS msb_copay_tier22, bga_copay_tier AS bga_copay_tier23, gen_copay_tier AS gen_copay_tier24, bng_sngl_inc_exc_ind AS bng_sngl_inc_exc_ind25, bng_multi_inc_exc_ind AS bng_multi_inc_exc_ind26, bga_inc_exc_ind AS bga_inc_exc_ind27, gen_inc_exc_ind AS gen_inc_exc_ind28, merge_defaults AS merge_defaults29, otc_chk_flag AS otc_chk_flag30, physician_list AS physician_list31, physician_specialty_list AS physician_specialty_list32, alternate_price_schedule AS alternate_price_schedule33, alternate_copay_sched AS alternate_copay_sched34, max_rxs_patient AS max_rxs_patient35, max_rxs_time_flag AS max_rxs_time_flag36, copay_network_ovrd AS copay_network_ovrd37, max_days_supply_opt AS max_days_supply_opt38, max_days_over_time AS max_days_over_time39, reject_only_msg_flag AS reject_only_msg_flag40, max_qty_per_fill AS max_qty_per_fill41, days_supply_opt_multiplier AS days_supply_opt_multiplier42, recalc_price_schedule AS recalc_price_schedule43, alternate_pricing_strategy AS alternate_pricing_strategy44, alternate_copay_strategy AS alternate_copay_strategy45, max_days_over_time_drug_list AS max_days_over_time_drug_list46, max_qty_over_time_drug_list AS max_qty_over_time_drug_list47, max_rxs_patient_drug_list AS max_rxs_patient_drug_list48, max_price_patient_drug_list AS max_price_patient_drug_list49, max_rxs_time_flag_mult AS max_rxs_time_flag_mult50, max_price_patient AS max_price_patient51, max_price_time_flag AS max_price_time_flag52, max_price_patient_opt AS max_price_patient_opt53, max_price_patient_split_opt AS max_price_patient_split_opt54, max_price_patient_pricing_opt AS max_price_patient_pricing_opt55, max_price_patient_split_copay AS max_price_patient_split_copay56, max_price_patient_copay AS max_price_patient_copay57, misc_data_1 AS misc_data_158, misc_data_2 AS misc_data_259, misc_data_3 AS misc_data_360, misc_data_4 AS misc_data_461, misc_data_5 AS misc_data_562, user_id_created AS user_id_created63, gpi_exception_list AS gpi_exception_list64, pharmacy_country_code AS pharmacy_country_code65, generic_product_id AS generic_product_id66, pharmacy_state AS pharmacy_state67, effective_date AS effective_date68, process_rule AS process_rule69, apply_on_group_renewal_ind AS apply_on_group_renewal_ind70 FROM PHIDBA.gpi_exception_lists WHERE (generic_product_id = ?)) a WHERE ROWNUM <= ?) WHERE rnum > ?
bind => [271040300018**, 1, 0] -
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 ThanksHi 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 -
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 -
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 6The 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 -
It is possible to use a column alias with a CASE in a SELECT? e.g. I have this code
SELECT
CASE WHEN categ_1 = 'BASIC' THEN total_1 WHEN categ_2 = 'BASIC' THEN total_2 END
FROM totalsBut the results column name comes out as CASEWHENCATEG_1='BASIC'THENTOTAL_1WHENCATEG_2='BASIC'THENTOTAL_2END
I want to use an alias but can't get it to work with the CASE. I guessed at
SELECT
CASE WHEN categ_1 = 'BASIC' THEN total_1 WHEN categ_2 = 'BASIC' THEN total_2 END 'alias'
FROM totalswhich doesn't work.Try without the single quotes after END
Christopher Soza
Oracle BI DBA
Orix Consultancy Services Ltd
b: http://sozaman.blogspot.com -
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} -
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.
CindyHi 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/ -
Hi,
in oracle express, on a report querry region I give this :
select 'PINS - # of times an item in the library cache was executed - '||
sum(pins),
'RELOADS - # of library cache misses on execution steps - '||
sum (reloads),
'RELOADS / PINS * 100 = '||round((sum(reloads) / sum(pins) *
100),2)||'%'
from v$librarycache
But I receive :
1 error has occurred
query column #1 ('PINS-#OFTIMESANITEMINTHELIBRARYCACHEWASEXECUTED-'||SUM(PINS)) is invalid, use column alias
Any idea ? Any help ?
Many thanks.You need to define column aliases.
SQL> SELECT 'PINS - # of times an item in the library cache was executed - ' || SUM (pins) AS LibRatio,
2 'RELOADS - # of library cache misses on execution steps - ' || SUM (reloads) AS MissRatio,
3 'RELOADS / PINS * 100 = ' || ROUND ((SUM (reloads) / SUM (pins) * 100), 2) || '%' AS Ratio
4 FROM v$librarycache
5 ;
LIBRATIO MISSRATIO
PINS - # of times an item in the library cache was executed - 10455253 RELOADS - #
Maybe you are looking for
-
Someone help! My IPhone is no longer accepting any wifi! It's being almost 2 months since that started! I've heard I'm not the only onde with this problem.. Does anyone know how to fix it? Can it be a problem with the software?
-
How to dual boot Windows XP and Windows 7 (XP installed first)
All information about it available here. ** Say thanks by clicking the "Thumb up" icon which is on the left. ** ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **
-
Component video switcher for HD
I would like to add Apple TV to my home theater setup, but I have only one component input. The monitor is an HD Pioneer Elite plasma, so I am looking for a switcher that can handle HD signals. Does one exist? Thanks, Ken
-
My ipad camera is not functioning very well
I can't take pictures!
-
I-Pad. How to organize my photo's
I want to load pictures from my camera to my I-Pad. Then move the pictures to other locations such as Facebook, Instagram, Flickr,LinkedIn,or individual folders. I bought an Apple adapter to load my pictures . I think the pictures go directly into t