Can't Export this query to Excel v1.5.4 5940

All,
I have this query that I can't export to excel.
SELECT '01' ,
'<$25',
COUNT(*),
SUM(salary)
FROM HR.employees
WHERE department_id = '30'
AND salary < 6000
Query returns results, just can't export to excel.. Tried giving the literals alternate column names ....no effect.
Thanks,

Hi Charles,
This issue has been logged as a bug.
I know that these export issues are been actively worked on at the moment for out next major release.
There is a workaround outlined here, although it not a great solution it may get you out of a bind in this one case.
Re: Export will not work - sample query pasted
CREATE VIEW workaround AS
SELECT '01' AS col1 ,
'<$25' AS col2,
COUNT(*) AS col3,
SUM(salary) AS col4
FROM HR.employees
WHERE department_id = '30'
AND salary < 6000 ;
SELECT * FROM workaround; -- export this result.
Regards,
Dermot

Similar Messages

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • In new Numbers, can you export a file into excel format?

    In new Numbers, can you export a file into excel format? Or is this something else thats been removed!!??
    HELP!!

    Hi AMGracie,
    In Numbers 3.0 on a MacBook Pro running OS X 10.9
    Regards,
    Ian.

  • How can i improve this query.

    Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
    select *
    from tableA A, viewB B,
    where A.key = B.key
    and a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    one more thing should function should be on left side of equal sign.
    will a join make it better or something else is needed more than that .

    952936 wrote:
    Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
    select *
    from tableA A, viewB B,
    where A.key = B.key
    and a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    one more thing should function should be on left side of equal sign.
    will a join make it better or something else is needed more than that .If you are a beginner try to learn the ANSI Syntax. This will help you a lot to write better queries.
    Your select would look like this in ANSI.
    select *
    from tableA A
    JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_function(a.key);The good thing here is that this separates the typical joining part of the select from the typical filter criteria.
    The other syntax very often let you forget one join. Just because there are so many tables and so many filters, that you just don't notice correctly anymore what was join and what not.
    If you notice that the number of column is not what you expect, you can easiely modify the query and compare the results.
    example A
    Remove View B from the query (temporarily comment it out).
    select *
    from tableA A
    --JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)
    example B
    You notice, that values from A are missing. Maybe because there is no matching key in ViewB? Then change the join to an outer join.
    select *
    from tableA A
    LEFT OUTER JOIN viewB B ON A.key = B.key
    WHERE a.criteria1 = '111'
    and a.criteria2 = some_funtion(a.key)(The outer keyword is optional, left join would be enough).

  • Can anyone explain this query.?

    Can anyone explain this query.?
    select nvl(s.p_id,q.p_id),nvl(s.p_type,q.p_type),nvl(s.p_line,q.p_line),
    nvl(s.sales2004,0),nvl(s.sales2005,0),nvl(q.quota2004,0),nvl(q.quota2005,0)
    from sales s
    full outer join quota q on(s.p_id = q.p_id and s.p_type=q.p_type and s.p_line=q.p_line)

    from sales s full outer join quota qTable quota is outer joined to table sales , if there are no matching records in table quota then also the query retuns the sales record with null values for the corresponding quota record columns
    NVL() has been used to handle such cases

  • Can anyone tell me how can i optimize this query...

    Can anyone tell me how can i optimize this query ??? :
    Select Distinct eopersona.numident From rscompeten , rscompet , rscv , eopersona , rscurso , rseduca , rsexplab , rsinteres
    Where ( ( (LOWER (rscompeten.nombre LIKE '%caracas%') AND ( rscompeten.id = rscompet.idcompeten ) AND ( rscv.id = rscompet.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscurso.nombre) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscurso.lugar) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rseduca.univinst) LIKE '%caracas%)' AND ( rscv.id = rseduca.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rsexplab.nombempre) LIKE '%caracas%' AND ( rscv.id = rsexplab.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rsinteres.descrip) LIKE '%caracas%' AND ( rscv.id = rsinteres.idcv ) AND ( eopersona.id = rscv.idpersona ) )
    OR ( (LOWER (rscv.cargoasp) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona ) )
    OR ( LOWER (eopersona.ciudad) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona )
    PLEASE IF YOU FIND SOMETHING WRONG.. PLEASE HELP ME.. this query takes me aproximatelly 10 minutes and the database is really small ( with only 200 records on each table )

    You are querying eight tables, however in any of your OR predicates you're only restricting 3 or 4 of those tables. That means that the remaining 4 or 5 tables are generating cartesian products. (n.b. the cartesian product of 5 tables with 200 rows each results in g 200^5 = 320,000,000,000 rows) Then you casually hide this behind "distinct".
    A simple restatement of your requirements looks like this:
    Select eopersona.numident
      From rscompeten,
           rscompet,
           rscv,
           eopersona
    Where LOWER (rscompeten.nombre) LIKE '%caracas%'
       AND rscompeten.id = rscompet.idcompeten
       AND rscv.id = rscompet.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    Select eopersona.numident
      From rscurso ,
           rscv,
           eopersona
    Where LOWER (rscurso.nombre) LIKE '%caracas%'
       AND rscv.id = rscurso.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    Select eopersona.numident
      From rscurso ,
           rscv,
           eopersona
    Where LOWER (rscurso.lugar) LIKE '%caracas%'
       AND rscv.id = rscurso.idcv
       AND eopersona.id = rscv.idpersona
    UNION
    ...From there you can eliminate redundancies as desired, but I imagine that the above will perform admirably with the data volumes you describe.

  • How can I export the query result into access(*.mdb) file?

    Dear all:
    I want to export the query result displayed in jsp into excel file
    and access file. And I have exported the result into excel format successfully, only one line should be added in the head of Jsp:
    <%@ page contentType="application/vnd.ms-excel; charset=gb2312" %>
    But how can I export it in access(*.mdb) file? I have replaced "excel"
    with "access". But it can't achive my goal.
    What should I do to achieve my goal?
    Thanks!

    The only reason your Excel export works is that Excel knows how to interpret comma separated values as an input file format. Access has no such beast.
    If you absolutely must provide info in an mdb, one solution would be to create an ODBC datasource pointing to an empty mdb, then push data into it using the jdbc:odbc bridge, then make a copy of the file and stream it down to the browser. You may run into some ugly file locking items here - set the ODBC connection so it is not shared, and that might help.
    This one is going to be ugly.
    I suppose another approach would be to write a simple VB applicatin that uses automation to create an MDB, then stream that file down to the browser from your servlet. That would almost certainly be faster than the ODBC approach.
    - K

  • How can I export the report to Excel or CSV format in Rational(Java)?

    <p>Dear all,</p><p>Now I develop CR report integrate with Web application, I use Ratioanl(RAD) to develop. And I want to export the report to Excel/CSV format, but always failed.</p><p>If I force it export CSV file in the system, when I use MS office to open this CSV file, the file content is bad.</p><p>Could any one tell me how to achieve this?</p><p> Many thanks!</p><p>Steven</p>

    <p>CR4E is bundled with RAD 7...actually to be clear it is a version of CR4E Professional. Users of RAD 7 will also get a dev/test license of CR Server as well as number of additional features to support developing applications against their BusinessObjects Enterprise or Crystal Reports Server systems. For more information regarding the RAD 7 launch you can read the press release here:</p><p><strong><a href="http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1">http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1</a> </strong> </p><p>I am hoping to do a webinar in January highlighting a number of the new features available with the IBM Rational Application Developer integration.</p><p>As for RAD 6 support, unfortunately the CR4E toolkit does require Eclipse 3.2 support so it will not work with RAD 6. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong>          </p>

  • How can I export the tickets into excel sheet?

    You can edit the report to display the specific information you need.  After choosing "Edit" for the report, you'll find a section at the bottom called "Columns to Display".  Pick and choose exactly what you want, and then click the button for "Save and Run".

    How can I export the tickets in to excel sheet? or get a report
    This topic first appeared in the Spiceworks Community

  • FR Web Report - Can't export to query

    In Hyperion Planning/Workspace 11.1.2.1, after running Web Report (HTML), cannot "Export in Query Mode" to Smartview. It launches Excel, but the worksheet stays blank and the report is not populated. It doesn't make a differenc if I'm already logged in to Smartview or not.
    The report successfully exports to Query in 11.1.2.0. Any assistance would be greatly appreciated!

    I would suggest to use a forum under /community [original link is broken]
    close this message here and open a new under the provided link.
    good luck

  • Can't export isolated responses as excel spreadsheets

    Hi.
    I used to be able to simply filter for individual responses and then export the individual search result as an Excel spreadsheet. All of sudden, I've stopped being able to do so. The dialogue box just comes up and says nothing but 'converting...' and doesn't do anything. I've tried waiting, refreshing, re-searching and re-filtering, logging out and logging back in, restarting my computer and adjusting my settings as co-author etc, but nothing has worked. I need to export the data into spreadsheets so I can mail merge address etc in letters.
    Please can someone help me out asap! Thanks.

    Hi mark,
    the excel 2003 your using you need to Enable macro's did you did it in internet options this might be 1 reason.
    For more details you can look at this Can't export from Disco Plus but am able to export From Desktop
    IF the problem still perisits with crosstab exporting then raise an SR with oracle might be there is some other problem for it.
    Best Wishes,
    Kranthi.
    Edited by: Kranthi.K on Aug 6, 2009 2:53 AM

  • Can I refactor this query to use an index more efficiently?

    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
            FROM members
            WHERE last_name like 'S%'
            ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?

    xaeryan wrote:
    I have a members table with fields such as id, last name, first name, address, join date, etc.
    I have a unique index defined on (last_name, join_date, id).
    This query will use the index for a range scan, no sort required since the index will be in order for that range ('Smith'):
    SELECT members.*
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate, idIs there any way I can get something like the following to use the index (with no sort) as well:
    SELECT members.*
    FROM members
    WHERE last_name like 'S%'
    ORDER BY joindate, idI understand the difficulty is probably; even if it does a range scan on every last name 'S%' (assuming it can?), they're not necessarily in order. Case in point:
    Last_Name:  JoinDate:
    Smith          2/5/2010
    Smuckers     1/10/2010An index range scan of 'S%' would return them in the above order, which is not ordered by joindate.
    So is there any way I can refactor this (query or index) such that the index can be range scanned (using LIKE 'x%') and return rows in the correct order without performing a sort? Or is that simply not possible?Come on. Index column order does matter. "LIKE 'x%'" actually is full table scan. The db engine accesses contiguous index entries and then uses the ROWID values in the index to retrieve the table rows.

  • I can't use this query on 10G, but can use on 9i

    I have ever used bellow query and no error
    SQL>select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    When I use on 10G, I can't query
    1* select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    SQL> /
    select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)
    ERROR at line 1:
    ORA-01799: a column may not be outer-joined to a subquery
    Help me,Please
    Why I can't use this on 10G?
    when i change = to in , i can use
    but i don't want to change
    help me for the reason

    I don't this gonna work on 9i either.
    Chang your query to
    select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid )
    Where
    rla.addresstype = (select code from bsowner.tab_addtyp where config1=3)

  • Can we make this query shorter....?

    hi there
    Can any body help me in reducing the number of lines in this query ! I am using union to concat 3 queries. Select fields in every query are same and in where condition also most of the joins are same in every query. but in where clause only two conditions are different. Can we make this 3 queries into one becoze entire select statement fields are same and most of the where conditions are same !
    Below is the query:
    SELECT
    au1.bu_id,
    au1.first_nam,
    au1.last_nam,
    c.id,
    c.first_nam_d,
    c.last_nam_d,
    c.birth_dte_d,
    c.ssn_num_d,
    se.id schd_event_id,
    seu.dsc,
    ssc.dsc,
    sea.access_typ,
    sea.ATTENDEE_TYP
    FROM
    CLIENT c,
    APP_USER au1,
    SCHD_STAT_CD ssc,
    schd_event_url seu,
    schd_evnt se,
    SCHD_evnt_stat ses,
    SCHD_EVNT_ATTENDEE sea,
    CLIENT_APPT ca
    WHERE
    c.id = ca.client_id_k AND
    au1.bu_id = se.APP_USER_BU_ID_PRIME_K AND
    ssc.code = ses.SCHD_STAT_CD_CODE_K AND
    seu.code = se.SCHD_EVNT_URL_CODE_K AND
    se.id = ses.SCHD_EVNT_ID_K AND
    se.id = sea.SCHD_EVNT_ID_K(+) AND
    se.id = ca.SCHD_EVNT_ID_K AND
    sea.ATTENDEE_TYP(+) = 'WORKER' AND
    ses.create_ts = (select max(create_ts) FROM SCHD_evnt_stat ses1 WHERE ses1.SCHD_EVNT_ID_K = ses.SCHD_EVNT_ID_K)
    UNION
    SELECT
    au1.bu_id,
    au1.first_nam,
    au1.last_nam,
    c.id,
    c.first_nam_d,
    c.last_nam_d,
    c.birth_dte_d,
    c.ssn_num_d,
    se.id schd_event_id,
    seu.dsc,
    ssc.dsc,
    FROM
    CLIENT c,
    APP_USER au1,
    SCHD_STAT_CD ssc,
    schd_event_url seu,
    schd_evnt se,
    SCHD_evnt_stat ses,
    SCHD_EVNT_ATTENDEE sea,
    CLIENT_APPT ca
    WHERE
    c.id = ca.client_id_k AND
    au1.bu_id = se.APP_USER_BU_ID_PRIME_K AND
    ssc.code = ses.SCHD_STAT_CD_CODE_K AND
    seu.code = se.SCHD_EVNT_URL_CODE_K AND
    se.id = ses.SCHD_EVNT_ID_K AND
    se.id = sea.SCHD_EVNT_ID_K AND
    se.id = ca.SCHD_EVNT_ID_K AND
    sea.ATTENDEE_TYP = 'ROLE' AND
    ses.create_ts = (select max(create_ts) FROM SCHD_evnt_stat ses1 WHERE ses1.SCHD_EVNT_ID_K = ses.SCHD_EVNT_ID_K)
    UNION
    SELECT
    au1.bu_id,
    au1.first_nam,
    au1.last_nam,
    c.id,
    c.first_nam_d,
    c.last_nam_d,
    c.birth_dte_d,
    c.ssn_num_d,
    se.id schd_event_id,
    seu.dsc,
    ssc.dsc,
    sea.access_typ,
    sea.ATTENDEE_TYP
    FROM
    CLIENT c,
    APP_USER au1,
    SCHD_STAT_CD ssc,
    schd_event_url seu,
    schd_evnt se,
    SCHD_evnt_stat ses,
    SCHD_EVNT_ATTENDEE sea,
    CLIENT_APPT ca
    WHERE
    c.id = ca.client_id_k AND
    au1.APP_ROLE_NAM_DESKTOP_K = sea.ATTENDEE_ID_K AND
    ssc.code = ses.SCHD_STAT_CD_CODE_K AND
    seu.code = se.SCHD_EVNT_URL_CODE_K AND
    se.id = ses.SCHD_EVNT_ID_K AND
    se.id = sea.SCHD_EVNT_ID_K AND
    se.id = ca.SCHD_EVNT_ID_K AND
    sea.ATTENDEE_TYP = 'ROLE' AND
    ses.create_ts = (select max(create_ts) FROM SCHD_evnt_stat ses1 WHERE ses1.SCHD_EVNT_ID_K = ses.SCHD_EVNT_ID_K)
    Thanks in advance
    prasanth a.s.

    Hi,
    it is difficult to change this query without the possibility to test it in a worksheet. But try the following query.
    I think it should be the same result as your 3 queries.
    SELECT au1.bu_id,
         au1.first_nam,
         au1.last_nam,
         c.id,
         c.first_nam_d,
         c.last_nam_d,
         c.birth_dte_d,
         c.ssn_num_d,
         se.id schd_event_id,
         seu.dsc,ssc.dsc,
         decode(sea.access_typ,NULL,' ',sea.access_typ) AS sea.access_typ,
         decode(sea.ATTENDEE_TYP,NULL,' ',sea.ATTENDEE_TYP) AS sea.ATTENDEE_TYP
    FROM CLIENT c,
         APP_USER au1,
         SCHD_STAT_CD ssc,
         schd_event_url seu,
         schd_evnt se,
         SCHD_evnt_stat ses,
         SCHD_EVNT_ATTENDEE sea,
         CLIENT_APPT ca
    WHERE c.id = ca.client_id_k
    AND au1.bu_id = se.APP_USER_BU_ID_PRIME_K
    AND ssc.code = ses.SCHD_STAT_CD_CODE_K
    AND seu.code = se.SCHD_EVNT_URL_CODE_K
    AND se.id = ses.SCHD_EVNT_ID_K
    AND se.id = ca.SCHD_EVNT_ID_K
    AND ses.create_ts = (select max(create_ts)
    FROM SCHD_evnt_stat ses1
                             WHERE ses1.SCHD_EVNT_ID_K = ses.SCHD_EVNT_ID_K)
    AND
    (sea.ATTENDEE_TYP(+) = 'WORKER' AND se.id = sea.SCHD_EVNT_ID_K(+)) --clause of the 1st query
    OR
    (sea.ATTENDEE_TYP = 'ROLE' AND se.id = sea.SCHD_EVNT_ID_K)               --clause of the 2nd query
    OR
    (sea.ATTENDEE_TYP = 'ROLE' AND se.id = sea.SCHD_EVNT_ID_K AND au1.APP_ROLE_NAM_DESKTOP_K = sea.ATTENDEE_ID_K) --clause of the 3rd query
    );

  • How can i speedup this query ?

    Hi,
    have a look at this query:
    SELECT DISTINCT element_short_description
               FROM sample_test_report, test_group, test_element_master
              WHERE str_test_group_code = tgr_test_group_code
                AND str_element_code = element_code
                AND tgr_group_description = 'SINTER_CHEMICAL_ANALYSIS'
           ORDER BY element_short_descriptionThing is that total number of rows present in "sample_test_report" tables are in lakh ...around 50 lakh.Other two tables have a few rows. This query is taking around 15 seconds for completion, can this query be made faster ?
    Note that proper indexing have been done already.
    Thanks.

    SELECT DISTINCT element_short_description
    FROM sample_test_report, test_group, test_element_master
    WHERE str_test_group_code = tgr_test_group_code
    AND str_element_code = element_code
    AND tgr_group_description = 'SINTER_CHEMICAL_ANALYSIS'
    ORDER BY element_short_description
    Can you provide us with explain plan?
    I suggest you use table alias every time:
    The alias is specified in the FROM clause after each table name.
    Table aliases make your queries more readable.
    Then gather statistics your tables:
    BEGIN
    DBMS_STATS.GATHER_TABLE_STATS('OWNER','TABLE',estimate_percent=>NULL,method_opt=>'FOR ALL INDEXED COLUMNS SIZE AUTO',DEGREE=>10,CASCADE=>TRUE,granularity=>'ALL');
    END;
    if your db version < 10g
    ANALYZE TABLE employees COMPUTE STATISTICS;
    ANALYZE TABLE employees ESTIMATE STATISTICS;
    If necessary rebuild index, check indexes are use.
    Unusable indexes are made valid by rebuilding them to recalculate the pointers.
    Rebuilding an unusable index re-creates the index in a new location, and then drops the unusable index. This can be done either by using Enterprise Manager or through SQL commands:
    ALTER INDEX HR.emp_empid_pk REBUILD;
    ALTER INDEX HR.emp_empid_pk REBUILD ONLINE;
    ALTER INDEX HR.email REBUILD TABLESPACE USERS;
    Note: Rebuilding an index requires that free space be available for the rebuild. Verify that there is sufficient space before attempting the rebuild. Enterprise Manager checks space requirements automatically.
    At the end, try join table separately and then concatenate them.
    Your query will be work good.
    Look at execution plan, if indexes are not used, use HINTs : There are many Oracle hints available to the developer for use in tuning SQL statements that are embedded in PL/SQL.
    please refer to http://www.dba-oracle.com/t_sql_hints_tuning.htm and http://www.adp-gmbh.ch/ora/sql/hints/index.html
    Good luck

Maybe you are looking for

  • Error while converting data from CATS to CO

    Hi Experts, We are transferring the HR timesheet data to CO.while uploading the time sheet data to CO through transaction code ZAFU we are getting the following error.Any help is greatly appreciated Trans: KB21N | BTCI-Creation_DD_CO_Actual_Activity

  • Tile List Selection indicator

    I have a tile list layout with some thumbnails. When one is selected it gets a default blueish background. Could someone explain how i would go about putting a nice green tick over a thumbnail once its selected?

  • Which version do I need?

    I have a SmartPhone Nokia Lumia 900 witd OS Windows Phone 7.5. Which version do I need? Could you please give me the link? Thank you very much. Pedro Carrizales

  • Program monitor

    My program monitor only shows part of the image - is different of the source monitor and I can't see proporply the whole image I'm editing. Magnification is set to Fit; Playback resolution is Full. Is there anything I can do?

  • IP Address Added But still does not allow access

    I have a laptop that I take around Australia. When I'm in a hotel I link to the interest via my mobile phone using its hotspot feature. This allows me to gain access to the internet with no problem. When I go to the allowed ip addresses section of Az