SQL statements consume several times

Hi all

Recently I have faced the issue, 10 processes are taking place (means 10 sql statements) 4 declarations are huge time. For timebieng, I killed all sessions, but I know that's not just solve the problem. Can someone please explain briefly how to analyze the issue, root cause conclusion and giving if possible solutions for example please...

What are the parameter that should be considered for the solution.


Concerning

KRISHNA

Hello Krishna,

The steps you need to take are explained in this thread:
How to post a SQL tuning application HOW TO: post a request for tuning SQL - model poster statement

In short:
review the query plans, or ideally: trace/tkprof processes.
After the output here, as well as your database version and optimizer parameter values.

Tags: Database

Similar Questions

  • Re-run a single SQL statement on several report page

    Hello

    I have a Page containing reports 3 and I was wondering if it is possible to re - run only one of these reports using a button or preferably a Select list that allows me to choose which 3 reports I want to ' Refresh/re-run '. I'm wrong completely here but I assumed that you choose the option to send a Page causes all regions to refresh that is re - run SQL queries, they are "based on". Any suggestion or correction to my hypothesis would be welcome.

    Kind regards

    Kevin.

    KevinFitz wrote:

    Each query region will in the sense of 'SELECT MAX' (customer_nr) + 1 as a customernrcnt customer and I expected that the value of the counter is displayed in an area increment as a result of change/selecting a value in the list.

    Is it realistic for me to see the results, I think using this method?

    Is - it there any activity in the other database sessions that will result in CUSTOMER_NR is incremented? If this isn't the case, then no, it not there no possibility to see any increase in the numbers. If you have a defined sequence and report on it, then refresh the reports will show a difference:

    select customer_seq.nextval seq from dual
    
  • high - OEM - sql statement is accurate?

    Hi guys,.

    I have a high SQL statement on the page in the report of the addm base will blink from time to time.

    RECOMMENDATION 1: SQL Tuning, 14% of profit (1130 seconds)
    ACTION: run SQL Tuning Advisor on the SQL with SQL_ID
    + "fphtjnquzzpud." +
    RELEVANT OBJECT: SQL with SQL_ID fphtjnquzzpud statement and
    PLAN_HASH 799822736
    SELECT USER_ID FROM SUBSCRIBER WHERE USER_ID =: B1 AND ACTIVE_STATUS
    += 'ACTIVE' +.
    ACTION: examine the SQL with SQL_ID 'fphtjnquzzpud' for
    improvement of the performance possible.
    RELEVANT OBJECT: SQL with SQL_ID fphtjnquzzpud statement and
    PLAN_HASH 799822736
    SELECT USER_ID FROM SUBSCRIBER WHERE USER_ID =: B1 AND ACTIVE_STATUS
    += 'ACTIVE' +.
    Rationale: with SQL_ID 'fphtjnquzzpud' SQL statement executed
    + 38800468 times and had an average time elapsed seconds 0,000016. +
    RATIONALE: Average CPU used by execution was 0,000016 seconds.


    Now, I do not understand this rational, the average time will blink and time cpu is just 0.000016.
    How can this be an obstacle high performance SQL?
    the time will blink is high because it is run several times. That's all, but every time, it's just using 0.000016.


    so should I still tune?

    Kind regards
    Noob

    You may need to do something, the case is:

    SQL_ID "fphtjnquzzpud" was performed * 38,800,468 * times during the study period.

    38,800,468 time * 0,000016 seconds = 620.807488 seconds = 10 minutes, 21 seconds

    Maybe it's not the time it takes but rather the number of executions?

    Have you considered pinnig the table of SUBSCRIBER in the KEEP buffer pool?

    : p

  • Several SQL statements with zero executions in the region of SQL

    Hello

    one of my databases has a large number of statements in the SQL box with zero executions. Some of them analyzed several times without a single run. Why the database stores these statements and how to avoid or reduce them?

    My problem is that the only time or zero time sql statements take the largest part of the area of sql:

    -sql statement and only once and without executing sql statements

    Select

    Count (1) num_sql_total,.

    sum (decode (executions, 1, 1, 0)) num_one_use_sql,.

    sum (decode (executions, 0, 1, 0)) num_no_use_sql,.

    Sum (RUNTIME_MEM) / 1024/1024 mb_used,.

    sum (decode (executions, sharable_mem, 1, 0)) / 1024/1024 mb_for_one_use_sql,.

    sum (decode (executions, 0, sharable_mem, 0)) / 1024/1024 mb_for_no_use_sql

    Of

    GV$ sqlarea

    where

    RUNTIME_MEM > 0;

    NUM_SQL_TOTAL NUM_ONE_USE_SQL NUM_NO_USE_SQL MB_USED MB_FOR_ONE_USE_SQL MB_FOR_NO_USE_SQL

    23318

    8739

    8027

    1420,95619106293

    381,41183757782

    530,999855041504

    Concerning

    Thomas

    This is not unusual. Another app could analyze for example hard the most often used SQLs in upstairs app - making benefit of further processing (in theory) of sweet analysis when you use these SQLs.

    In fact, I remember reading something to this effect as a performance for some factor or another Oracle document or note?

    So unless you have serious questions of shared pool, why bother with these sliders? What would be the problem?

  • Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) failed to install several times with an error Code: 0xD59.

    I have a Dell Vostro 420 - Windows XP. Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) failed to install several times with an error Code: 0xD59.  Please help me understand this and get this installed!

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for SQL server support. Please post your question in the Sub forum.

    Link: http://social.msdn.microsoft.com/Forums/en/sqlsetupandupgrade/threads

    For reference: how to solve the packets missing MSI or MSP during SQL Server Service Packs, hotfixes or cumulative updates: http://support.microsoft.com/kb/2015100

  • don't forget the select result of a statement to be used several times in the procedure

    Hi all

    I'm sorry for this kind of question, I'm not newbie, but still need your help.

    My need is remember the select result of a statement to be used several times in the procedure.

    My first guess is to use a temporary table, but I think there's better decisions.

    For example, I should make a heavy request

    Select the code from table_function (param1)

    Then, this query is used to insert a list of the id in table1, delete table2 and update in table 3.

    Help me please do not use if possible temporary tables.

    If there is more than one column, you need to create an object type at the database level. Create a collection of this type of object in the procedure.

    Example:

    CREATE OR REPLACE TYPE "OBJ1" as OBJECT(
            column1 varchar2(256 CHAR),
            column2 varchar2(35 CHAR)
            );
    
    CREATE OR REPLACE TYPE "nt_obj1" as table of OBJ1; -- this could be done at procedure level as well
    
    DECLARE
       t_employee_ids   nt_obj1;
    BEGIN
       SELECT OBJ1(column1,column2)
         BULK COLLECT INTO  t_employee_ids
         FROM table1
        WHERE column3 = NNN
    .............
    .....
    
  • Sql statement variable gives several values

    Hello

    I have a variable that has sql statement and it gives several values and I want to use this variable in one of the filter of interface condition to filter the data in the source table (which has millions of records).

    some could let me know the best method to achieve this scenario.

    Appreciate your help.

    You are right. Yesterday, I don't think in this case where the data could be from a different server. But I completely forgot today.
    Ok. Here you can find how to use sys_connect_by_path

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:907278700346567560

    Be careful with the size because I think that there is a limit to what can contain the variable ODI.

    After you have assessed the variable is how it could be used in the filter

    ITEM_TYPE_ID IN (#var_csv_id_list)

  • The format of a modifiable from the execution of SQL time SQL statement...

    The format of a change of the duration of execution of a SQL statement SQL statement?

    Thanks in advance

    Hello

    If you send two even SQL query with different format then everyone will make the analysis difficult. The execution path may still remain.

    Concerning

  • Lines show several times on State invoice

    Hello
    If terms of payment are payments then lines show several times on the invoice report.

    Assume that the payment terms are 10 installments (price point, Description, quantity, price per unit and Extended) lines appear 10 times. But I need display time line data only (article, Description, quantity, unit price and extended).

    Please help me to achieve this goal.

    Thank you
    Subbarao.

    have you tried to check the number of payment to one?

    Display lines only if the slice number is 1.

    print

    --
    Pradeep

  • Same link several times variable using dynamic SQL

    Salvation;
    I have a query that uses the variable even several times, is there a way I could just use that variable only once and it will take several times.
    Request is;
    run immediately "SELECT count (*) x WHERE MONTH_ID =: VOMNTH_ID"
    UNION
    SELECT count (*) FROM Y WHERE MONTH_ID =: VOMNTH_ID
    Union
    SELECT count (*) FROM WHERE MONTH_ID = z: VOMNTH_ID ' help months1, month1, months1
    What I don't want only once to provide months1.
    Your help is appreciated.
    PKM
    execute immediate
      'with p as (select :vmonth_id pmon from dual)
    SELECT count(*) FROM x,p WHERE MONTH_ID = p.pmon
    UNION
    SELECT count(*) FROM Y,p WHERE MONTH_ID = p.pmon
    union
    SELECT count(*) FROM z,p WHERE MONTH_ID =p.pmon '
    using month1;
    

    HTH

    Nigel cordially

  • How to 'show' a static pseudo index using SQL statement select?

    Hello again,

    I have to post a time of 24 hours as an index. (00:00 - 23:00)
    It's easy, if data are available.

    But, if the data are not regularly exist on specific time (the time is not regular, IE: 00:00, 01:00, 05:00, 08:00, 10:00, 11:00, 23:00), then it of OK for a TABLE, but not for a CHART.

    Here is the story:

    I've written a SQL statement that can 'choose' what to display respectively the time available. The result will appear on the map: days or the time is used for the x-axis and the respective value on axis y.
    Example:
    + If the data consists of 'days' (ie: the last 5 days from now on, 16/07/2012, 17/07/2012, 18/07/2012, 19/07/2012, 20/07/2012), the chart will display these dates on the x-axis.
    + If the data consists of 'hours' (ie: only 1 day, hour 00:00 - 23:00), then the chart shows the hours on the x-axis.

    If the 'hours' are not regular, means: there is no data on the specific hours, the result of the query is not as regular, average: the value of X - axis "jumps" irregularly.

    Question:
    Is it possible to interrogate our own static value?
    for example:
    Select 'Hello' from dual-> result: 'Hello', 1 column, 1 line
    But how to display it into several lines, i.e.:

    Time
    *****
    0
    1
    2
    3
    4
    5
    ...
    ...
    23


    Note:
    the x-axis on the graph model can be customized only for 1 single mode, example: 'Days',
    but of course it will not appear correctly if the result of the query are "hours."
    This means: I have to find the workaround on the SQL query.


    DB: ORA 11


    Thank you and best regards.

    You can generate mulltiple rows if you use LEVEL and CONNECT BY:

    SQL> select level
      2  from   dual
      3  connect by level <= 10;
    
         LEVEL
    ----------
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    
    10 rows selected.
    
    SQL>  select sysdate+level-1
      2  from   dual
      3   connect by level <= 10;
    
    SYSDATE+LEVEL-1
    -------------------
    20-07-2012 12:48:26
    21-07-2012 12:48:26
    22-07-2012 12:48:26
    23-07-2012 12:48:26
    24-07-2012 12:48:26
    25-07-2012 12:48:26
    26-07-2012 12:48:26
    27-07-2012 12:48:26
    28-07-2012 12:48:26
    29-07-2012 12:48:26
    
    10 rows selected.
    
    SQL> select to_char(trunc(sysdate), 'hh24')+level-1
      2  from  dual
      3  connect by level <= 24;
    
    TO_CHAR(TRUNC(SYSDATE),'HH24')+LEVEL-1
    --------------------------------------
                                         0
                                         1
                                         2
                                         3
                                         4
                                         5
                                         6
                                         7
                                         8
                                         9
                                        10
                                        11
                                        12
                                        13
                                        14
                                        15
                                        16
                                        17
                                        18
                                        19
                                        20
                                        21
                                        22
                                        23
    
    24 rows selected.
    
  • Date range of calculation with the SQL statement

    I'm sure that there is a way to do this in SQL, but I can't understand it. I can write a PL/SQL script to do it, but prefer to use a SQL statement. My database is the database of Oracle 10.2.0.4.0.

    I have a table that contains information such as employee number, service id, and date effective start-up of the person in this Department. There are data in another table I want to update their department number in based on their date of entry in the range. If I could figure out how to correctly select the entry into force, I can do the rest.

    I have data such as:
    EMP_ID DEPT_NO EFFECTIVE
    -------------- ----------------- ---------------------
    101 1000 1/15 / 2001
    1050 101 5/24 / 2005
    101 2010 6/8/2008
    101 1000 8/2/2010

    I want to write a SELECT statement that returns something like this where the end_date is the eve of the ENTRY into force and the last record didn't an end_date because they are always assigned to this service. In addition, the first record in the column, I won't choose a DEPT_NO because the logic of the entry into force has been added in January 2001, he says if a person started in 1985 they might have zero departments at several times so I won't update all data for this period:

    EMP_ID DEPT_NO EFFECTIVE END_DATE
    --------------- ---------------- ---------------- ----------------
    101 1/14 / 2001
    101 1000 1/15 / 2001 5/23/2005
    1050 101 5/24 / 2005 6/7/2008
    101 2010 6/8/2008-8/1/2010
    101 1000 8/2/2010

    Here is a script to create the data into a temporary table which can be used to write a SELECT statement. I added two records of employees with different dates.

    create the table temp_activity
    (emp_id number (12),)
    dept_no number (12).
    (entry into force);

    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (101,1000,to_date('1/15/2001','MM/DD/YYYY'))
    /
    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (101,1050,to_date('5/24/2005','MM/DD/YYYY'))
    /
    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (101,2010,to_date('6/8/2008','MM/DD/YYYY'))
    /
    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (101,1000,to_date('8/2/2010','MM/DD/YYYY'))
    /
    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (102,1040,to_date('1/15/2001','MM/DD/YYYY'))
    /
    INSERT INTO temp_activity
    (EMP_ID, DEPT_NO, ENTERED INTO FORCE)
    VALUES
    (102,2000,to_date('6/16/2006','MM/DD/YYYY'))
    /

    Any help is appreciated. It's probably easy, but I can't get my brain wrapped around it.

    Thanks - mike
    select  emp_id,
            dept_no,
            effective,
            end_date
      from  (
              select  emp_id,
                      dept_no,
                      effective,
                      lead(effective) over(partition by emp_id order by effective) - 1 end_date,
                      row_number() over(partition by emp_id order by effective) rn
                from  temp_activity
             union all
              select  emp_id,
                      null dept_no,
                      null effective,
                      min(effective) - 1 end_date,
                      0 rn
                from  temp_activity
                group by emp_id
            )
      order by emp_id,
               rn
    /
    
        EMP_ID    DEPT_NO EFFECTIVE  END_DATE
    ---------- ---------- ---------- ----------
           101                       01/14/2001
           101       1000 01/15/2001 05/23/2005
           101       1050 05/24/2005 06/07/2008
           101       2010 06/08/2008 08/01/2010
           101       1000 08/02/2010
           102                       01/14/2001
           102       1040 01/15/2001 06/15/2006
           102       2000 06/16/2006
    
    8 rows selected.
    
    SQL> 
    

    SY.

  • Function used in the view definition is called several times

    I'm writing a view that boils down to the following statement:

    SELECT val, val)
    SELECT SYS_GUID() val
    OF the double
    )

    Against my expectation, which calls SYS_GUID() twice, resulting in two different values for val.

    I have written here as view inline, but it must be a regular view in reality. Is it possible to build this view while SYS_GUID is called only once, even if the resulting value is then selected several times? Naively, I want to affect the outcome of SYS_GUID to a variable, and then select the value of this variable. However, this seems not possible in a view.

    New to Oracle PL/SQL. This works as expected in T - SQL SQL Server.

    Thanks for any help or insight you can provide.

    -Brian

    Hmmm, I have no 11 + available so I can't check a solution, but I would like to test:

    SELECT val, val FROM (
    SELECT SYS_GUID() val
    FROM dual
    WHERE ROWNUM = 1
    )
    

    or

    SELECT val, val FROM (
    SELECT /*+ NO_MERGE */ SYS_GUID() val
    FROM dual
    )
    

    Edit: the no_merge indicator seems to work in 10.2.0.4

    Published by: David_Aldridge on December 14, 2010 23:21

  • Plans of multiple executions for the same SQL statement

    Dear experts,

    awrsqrpt. SQL shows several plans for a single SQL statement executions. How is it possible that a single SQL statement will be several Plans of executions within the AWR report.

    Here is the output of the awrsqrpt for your reference.

    WORKLOAD REPOSITORY SQL Report
    
    Snapshot Period Summary
    
    DB Name         DB Id    Instance     Inst Num Release     RAC Host
    ------------ ----------- ------------ -------- ----------- --- ------------
    TESTDB          2157605839 TESTDB1               1 10.2.0.3.0  YES testhost1
    
                  Snap Id      Snap Time      Sessions Curs/Sess
                --------- ------------------- -------- ---------
    Begin Snap:     32541 11-Oct-08 21:00:13       248     141.1
      End Snap:     32542 11-Oct-08 21:15:06       245     143.4
       Elapsed:               14.88 (mins)
       DB Time:               12.18 (mins)
    
    SQL Summary                            DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    
                    Elapsed
       SQL Id      Time (ms)
    ------------- ----------
    51szt7b736bmg     25,131
    Module: SQL*Plus
    UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(ACCT_DR_BAL,
    0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND TEST_ACC_NB = ACCT_ACC_NB(+)) WHERE
     TEST_BATCH_DT = (:B1 )
    
              -------------------------------------------------------------
    
    SQL ID: 51szt7b736bmg                  DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> 1st Capture and Last Capture Snap IDs
       refer to Snapshot IDs witin the snapshot range
    -> UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL,0) + NVL(AC...
    
        Plan Hash           Total Elapsed                 1st Capture   Last Capture
    #   Value                    Time(ms)    Executions       Snap ID        Snap ID
    --- ---------------- ---------------- ------------- ------------- --------------
    1   2960830398                 25,131             1         32542          32542
    2   3834848140                      0             0         32542          32542
              -------------------------------------------------------------
    
    
    Plan 1(PHV: 2960830398)
    -----------------------
    
    Plan Statistics                        DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
    
    Stat Name                                Statement   Per Execution % Snap
    ---------------------------------------- ---------- -------------- -------
    Elapsed Time (ms)                            25,131       25,130.7     3.4
    CPU Time (ms)                                23,270       23,270.2     3.9
    Executions                                        1            N/A     N/A
    Buffer Gets                               2,626,166    2,626,166.0    14.6
    Disk Reads                                      305          305.0     0.3
    Parse Calls                                       1            1.0     0.0
    Rows                                        371,735      371,735.0     N/A
    User I/O Wait Time (ms)                         564            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                 26            N/A     N/A
              -------------------------------------------------------------
    
    Execution Plan
    ------------------------------------------------------------------------------------------------
    | Id  | Operation                    | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------------------
    |   0 | UPDATE STATEMENT             |                 |       |       |  1110 (100)|          |
    |   1 |  UPDATE                      | TEST            |       |       |            |          |
    |   2 |   TABLE ACCESS FULL          | TEST            |   116K|  2740K|  1110   (2)| 00:00:14 |
    |   3 |   TABLE ACCESS BY INDEX ROWID| ACCT            |     1 |    26 |     5   (0)| 00:00:01 |
    |   4 |    INDEX RANGE SCAN          | ACCT_DT_ACC_IDX |     1 |       |     4   (0)| 00:00:01 |
    ------------------------------------------------------------------------------------------------
    
    
    
    
    Plan 2(PHV: 3834848140)
    -----------------------
    
    Plan Statistics                        DB/Inst: TESTDB/TESTDB1  Snaps: 32541-32542
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
    
    Stat Name                                Statement   Per Execution % Snap
    ---------------------------------------- ---------- -------------- -------
    Elapsed Time (ms)                                 0            N/A     0.0
    CPU Time (ms)                                     0            N/A     0.0
    Executions                                        0            N/A     N/A
    Buffer Gets                                       0            N/A     0.0
    Disk Reads                                        0            N/A     0.0
    Parse Calls                                       0            N/A     0.0
    Rows                                              0            N/A     N/A
    User I/O Wait Time (ms)                           0            N/A     N/A
    Cluster Wait Time (ms)                            0            N/A     N/A
    Application Wait Time (ms)                        0            N/A     N/A
    Concurrency Wait Time (ms)                        0            N/A     N/A
    Invalidations                                     0            N/A     N/A
    Version Count                                     2            N/A     N/A
    Sharable Mem(KB)                                 26            N/A     N/A
              -------------------------------------------------------------
    
    Execution Plan
    ---------------------------------------------------------------------------------------------
    | Id  | Operation                    | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    ---------------------------------------------------------------------------------------------
    |   0 | UPDATE STATEMENT             |              |       |       |     2 (100)|          |
    |   1 |  UPDATE                      | TEST         |       |       |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| TEST         |     1 |    28 |     2   (0)| 00:00:01 |
    |   3 |    INDEX RANGE SCAN          | TEST_DT_IND  |     1 |       |     1   (0)| 00:00:01 |
    |   4 |   TABLE ACCESS BY INDEX ROWID| ACCT         |     1 |    26 |     4   (0)| 00:00:01 |
    |   5 |    INDEX RANGE SCAN          | INDX_ACCT_DT |     1 |       |     3   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------
    
    
    
    Full SQL Text
    
    SQL ID       SQL Text
    ------------ -----------------------------------------------------------------
    51szt7b736bm UPDATE TEST SET TEST_TRN_DAY_CL = (SELECT (NVL(ACCT_CR_BAL, 0) +
                  NVL(ACCT_DR_BAL, 0)) FROM ACCT WHERE ACCT_TRN_DT = (:B1 ) AND PB
                 RN_ACC_NB = ACCT_ACC_NB(+)) WHERE TEST_BATCH_DT = (:B1 )
    Your contribution is very much appreciated.

    Thank you for taking your time to answer my question.


    Concerning

    Oracle Lover3 wrote:
    How will I know (from Plan 1 and Plan 2) whose execution plan chose for the current run?

    Since you're already on 10.2, you can identify the actual execution plan by checking in V$ SESSION SQL_ID and SQL_CHILD_NUMBER column. This can be used to identify the plan in V$ SQL_PLAN (columns SQL_ID and CHILD_NUMBER) and in 10g, you can use the convenient DBMS_XPLAN. Function DISPLAY_CURSOR for the information of the real plan using these two parameters.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Using a Bind Variable in the FROM of a SQL statement part?

    Hi all

    I have a problem, I am trying to execute a SQL statement. However, I need the FROM part of the SQL statement in a variable binding. This is because the end user will have to choose between 2 views of database.

    I tried this:
    Select CON_ID from: P23_DB_NAME where CON_LEGACY_ID =: P23_CONLEG_NO

    I had no chance. The error I got was,
    '+ The query cannot be parsed in the generator. If you believe that your request is
    syntactically correct, choose the generic "columns" box below the
    the source of the region without analysis.
    "ORA-00903: invalid table name +".
    What makes sence, but now I'm a little stuck.

    Does anyone have ideas for a workaround?

    Thanks in advance.
    -N.S.N.O.

    The example I gave you is quite simple. You must take some time to study it to see where you need to be very careful what put you where. Now, of course your example does not work becaues you have several errors. It will work for you:

    DECLARE
       x   VARCHAR2 (4000);
    BEGIN
       x := x || 'SELECT CON_ID FROM ';
       x := x || :p23_db_name;
       x := x || ' WHERE CON_LEGACY_ID = ' || :p23_conleg_no;
       RETURN (x);
    END;
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for

  • Links will be no longer open with "ctrl + click".

    I think that the title explains it all. I can no longer open links in a new tab with ctrl + left click"them. As someone who has a lot of tabs much of the time, it's horribly embarrassing.

  • LabVIEW 2014 hangs at startup

    Hello I recently installed the drivers of the Motion of my installation of Labview 2014 now and my 2014 "Device Drivers" DVD freezes just after it starts. Happens to the popup 'Welcome to Labview' and then it locks the mouse cursor and is sitting the

  • signature for application Widget

    I'm developing a Widget using the BlackBerry Web plug-in in Eclipse. \ I installed on another Eclipse SDK to code signing tool environment, but how to do code signing application Widget.

  • IPSec overhead

    Hello Can someone tell me what kind of overhead 3DES (ESP) puts on an IP packet? Memory, theres 50-73 extra bytes and I remember that it must be in increments of 8 but I don't understand the huge variation (50-73). Can I accurately calculate the load

  • Pen tool does not work in Premiere Pro CS6

    I've never had this problem before. When I import a video I need to expose a person with the pen tool, I can't do anything. It also did not work in After Effects, but I installed Quicktime Alternative and the pen tool has started working again in Ae