Need to query to find stored procedures that takes great execution time

Hi all

I use the oracle version below:

Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE Production 11.2.0.3.0

AMT for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

is it possible to find the name of stored procedure that take too long to run, I need those optimized all SPs.

Is there a query as top queries that are used to find queries albums that have great time for execution...

or y at - it another way to find the names of MS. I try with AWR report but showing only used the names of MS.

Thank you

No, it not there no such request as far as I know.

or y at - it another way to find the names of MS.

Just listen to complaints from the user...

Tags: Database

Similar Questions

  • Need to query in a stored procedure

    Hi all

    I need to create a stored procedure that does not take any parameter, it's simply an SP which only made the update.

    I update two tables here twice, I update the tables matched_news and matched_news_industries under certain conditions.

    I update two tables twice and after two update tables once, I need to update another table is gm_sector_activity_tracker table, in this update that I need
    update of is_transfered = 'Y' where is_transfered = "M" but I need to update only the rows that are updated in above two updates.

    It means assume that my above two updated day to day only 4 rows, so I need to update the records in the gm_sector_activity_tracker table.

    Here's the code for MS:

    CREATE OR REPLACE PROCEDURE SI_UPDATE_SOURCES_LOGO_PDF AS

    BEGIN

    update of matched_news one

    Set logo_source = (select distinct source_logo from news_sources

    where channel_id = a.channel_id

    and a.newS_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am')

    and 'a.newS_type =' Reports

    and a.LOGO_SOURCE is null

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177));

    COMMIT;

    update of matched_news_industries one

    Set logo_source = (select distinct source_logo from news_sources

    where channel_id = a.channel_id

    and a.newS_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am')

    and 'a.newS_type =' Reports

    and a.LOGO_SOURCE is null

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177));

    COMMIT;

    / * Once this is done, we need to update the table "gm_sector_activity_tracker" column is_transferred = 'Y' where is_transferred = am' one by one.* /

    Matched_News update

    source_name = value (select distinct (ltrim (rtrim (source_name))) of channel_source_type)

    WHERE CHANNEL_ID = A.CHANNEL_ID

    and ONTO_ID = a.ONTO_ID

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177)

    and 'a.news_type =' Reports

    and a.auto_status = 'Categorized'

    and a.news_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am'))

    where exists (select channel_source_type source_name

    where channel_id = a.channel_id

    and ONTO_ID = a.ONTO_ID

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177)

    and 'a.news_type =' Reports

    and a.auto_status = 'Categorized'

    and a.news_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am'));

    COMMIT;

    Update matched_news_industries has

    source_name = value (select distinct (ltrim (rtrim (source_name))) of channel_source_type)

    WHERE CHANNEL_ID = A.CHANNEL_ID

    and ONTO_ID = a.ONTO_ID

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177)

    and 'a.news_type =' Reports

    and a.auto_status = 'Categorized'

    and a.news_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am'))

    where exists (select channel_source_type source_name

    where channel_id = a.channel_id

    and ONTO_ID = a.ONTO_ID

    and a.channel_id not in (6522,6835,6944,6945,6946,7189,8396,8397,8398,5395,9176,9177)

    and 'a.news_type =' Reports

    and a.auto_status = 'Categorized'

    and a.news_id in (select news_id was in gm_sector_activity_tracker where is_transferred = am'));

    COMMIT;

    / * Once this is done, we need to update the table "gm_sector_activity_tracker" column is_transferred = 'Y' where is_transferred = am' one by one.*.

    END SI_UPDATE_SOURCES_LOGO_PDF;

    Thank you


    Your instructions to update, it's what you do:

    MERGE INTO MATCHED_NEWS HAS

    WITH THE HELP OF NEWS_SOURCES B

    WE (A.CHANNEL_ID = B.CHANNEL_ID)

    WHEN MATCHED THEN

    UPDATE

    SET A.LOGO_SOURCE = B.SOURCE_LOGO

    WHERE A.NEWS_ID IN (NEWS_ID HAS SELECTION SUMMER)

    OF GM_SECTOR_ACTIVITY_TRACKER

    WHERE IS_TRANSFERRED = AM')

    AND A.NEWS_TYPE = 'reports '.

    AND A.LOGO_SOURCE IS NULL

    AND A.CHANNEL_ID NOT IN (6522,

    6835,

    6944,

    6945,

    6946,

    7189,

    8396,

    8397,

    8398,

    5395,

    9176,

    9177);

    You can do the same for the other tables as separate MERGE one after the other.

  • I need to return the result of a query on a stored procedure

    I need to return the result of a query to a stored procedure, I mean when I run a stored procedure it returns a result set in a select statement.
    Best regards...

    Hello.

    Do you really want a stored procedure for this?
    Why not just a script that contains the query?

    Assuming that you don't really want a stored procedure, you'll have to decide what to do with the results.
    An option is a slider.

    For example, you can write a procedure of this type to hold the query:

    CREATE OR REPLACE PROCEDURE USP_TEST
    (     out_cursor     OUT     SYS_REFCURSOR
    )
    IS
    BEGIN
         OPEN  out_cursor
         FOR     SELECT     *
              FROM     scott.emp;
    END  USP_TEST;
    /
    SHOW ERRORS
    

    You can move the cursor to another procedure for handling.

    You could test this in SQL * more by creating a variable blond:

    VARIABLE     usp_test_cursor     REFCURSOR;
    
    EXEC  usp_test (:usp_test_cursor);
    
    PRINT     :usp_test_cursor
    
  • Calling an Oracle stored procedure that returns a REF cursor

    Hi guys,.

    I'm calling an Oracle stored procedure that returns a REF CURSOR. Here is the piece of code that I'm working on:

    procedure TC307_MAIN (p_program varchar2, varchar2, varchar2, result_set OUT eng_cur p_engchgno p_project) as
    Start
    IF (p_program = 'Navybased' and p_project = 'PROTECTOR-BUILD') THEN
    result_set: = comments. Tc307_Eng_Chg_Rpt.TC307_RNZN (p_engchgno, result_set = >);
    END IF;
    end TC307_MAIN;

    procedure TC307_RNZN (p_engchgno varchar2, result_set IN OUT eng_cur) as
    Start
    end TC307_RNZN;

    PL/SQL code behind TC307_RNZN is big enough, that's why I've not stuck here. Basically, the second stored procedure executes a PLSQL statement and returns a result set. I need to return the result_set in the main proceedings based on nested else statement which I am still trying to build. I get a compilation... error can someone guide me with the correct method to call the second stored procedure and returning in the main proceedings.

    Thank you very much.

    Rohan,

    Try this

    procedure TC307_MAIN(p_program  varchar2,
                           p_project  varchar2,
                           p_engchgno varchar2,
                           result_set OUT eng_cur) as
      begin
           IF (p_program = 'RNZN' and p_project = 'PROTECTOR-BUILD') THEN
                  -- This is a procedure not a function
                         guest.Tc307_Eng_Chg_Rpt.TC307_RNZN(p_engchgno, result_set); --UR compilation error on this line*
          END IF;
      end TC307_MAIN;
    

    SS
    http://DB-Oracl.blogspot.com

  • How to execute a stored procedure that returns a cursor?

    How to execute a stored procedure that returns a cursor?

    Follow the code:

    CREATE OR REPLACE PROCEDURE stp_cashin_grupo
    (p_func in VARCHAR
    p_cod_grup in full
    p_des_grup in VARCHAR
    p_logi in VARCHAR
    p_curs_rset ON infoc.pck_cashin_grupo.curs_rset
    )
    IS
    BEGIN

    If p_func = "1" then
    OPEN FOR P_curs_rset
    Select
    cod_grup
    des_grup
    dat_manu_grup
    des_logi_manu
    of infoc.tbl_cashin_grupo
    order of des_grup;
    end if;
    END stp_cashin_grupo;


    and packaging:

    CREATE or REPLACE PACKAGE pck_cashin_grupo
    AS
    TYPE curs_rset IS REF CURSOR;
    END pck_cashin_grupo;

    My question is how to execute in sql plus?
    Stp_cashin_grupo EXEC ('1', 0, ", '465990', my doubt is how to move the cursor as return)


    Thank you

    It is described in the manual

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14357/CH5.htm#sthref1122

  • How to test a procedure that takes a PARAMETER array?

    Oracle 9i

    I created a procedure that takes an ARRAY PARAMETER (essentially a list of the IDS of employees and this procedure is called from the Java side), and the procedure is to remove the employees based on employee ID list.

    I stated that the type employee_id_array is TABLE of NUMBER.

    I want to test this procedure in sqlplus, but how to move this list of 'id table used' to this procedure, so I know it works?

    Thank you.

    Sure.

    satyaki>
    satyaki>select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>create or replace type number_array as table of number;
      2  /
    
    Type created.
    
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE procedure delete_employee(
      2                                               p_employee_id_array in number_array
      3                                             )
      4  as
      5  begin
      6   for i in 1 .. p_employee_id_array.count
      7   loop
      8     --dbms_output.put_line ('this employee idis is: ' || p_query_id_array(i));
      9     delete from emp
     10     where empno in (to_number(p_employee_id_array(i)));
     11   end loop;
     12  end delete_employee;
     13  /
    
    Procedure created.
    
    Elapsed: 00:00:00.13
    satyaki>
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7903                                                 1000                    10
          7499 Travor     SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    
    14 rows selected.
    
    Elapsed: 00:00:00.16
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>declare
      2     vv number_array := number_array(7903,7499);
      3  begin
      4    delete_employee(vv);
      5  end;
      6  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.15
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    
    12 rows selected.
    
    Elapsed: 00:00:00.16
    satyaki>
    

    Kind regards.

    LOULOU.

  • Need help to convert a sql query to a stored procedure

    I have a task to convert a script sql in a stored precedure. The sql with different pr_id test_type are below. And the stored procedure must accept a pr_id and a test_type as an argument. Test type will be 3 for ATI and 2 for TI.  It must return a single value, the greatest distance calculated to fill the value of tap.  It is possible that they will pass a prid, test_type combination that will have all the records in the dsltdr table.

    {
    SELECT pw,
    Round ((DECODE (t.rfltype1, 5, t.rfldist1,)))
    DECODE (t.rfltype2, 5, t.rfldist2,)
    DECODE (t.rfltype3, 5, t.rfldist3,)
    DECODE (t.rfltype4, 5, t.rfldist4,)
    DECODE (t.rfltype5, 5, t.rfldist5,)
    DECODE (t.rfltype6, 5, t.rfldist6,)
    DECODE (t.rfltype7, 5, t.rfldist7,)
    DECODE (t.rfltype8, 5, t.rfldist8,)
    NULL)))
    (- launch_start) * distk * vop, 2) dist
    OF dsltdr t
    WHERE pr_id = 464529581
    AND test_type = 3
    ORDER BY pw CSA;
    }



    SELECT pw,
    Round ((DECODE (t.rfltype1, 5, t.rfldist1,)))
    DECODE (t.rfltype2, 5, t.rfldist2,)
    DECODE (t.rfltype3, 5, t.rfldist3,)
    DECODE (t.rfltype4, 5, t.rfldist4,)
    DECODE (t.rfltype5, 5, t.rfldist5,)
    DECODE (t.rfltype6, 5, t.rfldist6,)
    DECODE (t.rfltype7, 5, t.rfldist7,)
    DECODE (t.rfltype8, 5, t.rfldist8,)
    NULL)))
    (- launch_start) * distk * vop, 2) dist
    OF dsltdr t
    WHERE pr_id = 464528353
    AND test_type = 3
    ORDER BY pw CSA;


    SELECT pw,
    Round ((DECODE (t.rfltype1, 5, t.rfldist1,)))
    DECODE (t.rfltype2, 5, t.rfldist2,)
    DECODE (t.rfltype3, 5, t.rfldist3,)
    DECODE (t.rfltype4, 5, t.rfldist4,)
    DECODE (t.rfltype5, 5, t.rfldist5,)
    DECODE (t.rfltype6, 5, t.rfldist6,)
    DECODE (t.rfltype7, 5, t.rfldist7,)
    DECODE (t.rfltype8, 5, t.rfldist8,)
    NULL)))
    (- launch_start) * distk * vop, 2) dist
    OF dsltdr t
    WHERE pr_id = 464527142
    AND test_type = 2
    ORDER BY pw CSA;


    SELECT pw,
    Round ((DECODE (t.rfltype1, 5, t.rfldist1,)))
    DECODE (t.rfltype2, 5, t.rfldist2,)
    DECODE (t.rfltype3, 5, t.rfldist3,)
    DECODE (t.rfltype4, 5, t.rfldist4,)
    DECODE (t.rfltype5, 5, t.rfldist5,)
    DECODE (t.rfltype6, 5, t.rfldist6,)
    DECODE (t.rfltype7, 5, t.rfldist7,)
    DECODE (t.rfltype8, 5, t.rfldist8,)
    NULL)))
    (- launch_start) * distk * vop, 2) dist
    OF dsltdr t
    WHERE pr_id = 464528984
    AND test_type = 2
    ORDER BY pw CSA;



    >

    SELECT pw,
    Round ((DECODE (t.rfltype1, 5, t.rfldist1,)))
    DECODE (t.rfltype2, 5, t.rfldist2,)
    DECODE (t.rfltype3, 5, t.rfldist3,)
    DECODE (t.rfltype4, 5, t.rfldist4,)
    DECODE (t.rfltype5, 5, t.rfldist5,)
    DECODE (t.rfltype6, 5, t.rfldist6,)
    DECODE (t.rfltype7, 5, t.rfldist7,)
    DECODE (t.rfltype8, 5, t.rfldist8,)
    NULL)))
    (- launch_start) * distk * vop, 2) dist
    OF dsltdr t
    WHERE pr_id = 464529918
    AND test_type = 2
    ORDER BY pw CSA;

    How to start with?

    Thanks in advance.

    I removed the dbms_output statement because it does not seem to turn it on. If you do this from sqlplus
    Make sure that you type "serverout on" and press return.

    declare
    vPW number := 0 ;
    vDistance number := 0 ;
    begin
    sp_dsl_test(3,'12345',vDistance,vPW) ;
    DBMS_OUTPUT.PUT_LINE('Distance = '|| vDistance || ' PW = '|| vPW);
    end;
    

    Published by: FlyingGuy on March 3, 2011 14:24

  • query to find bad queries that are taking place

    I write a job that takes place each a work hour.the will execute the query, the query will select identifiers of bad queries sql which is need for queries that have long been and always in running currently.we will run this work every time some sort of query has bad queries that perform queries currently.the o/p will be inserted into a table.i query to choose bad queries that is currently running

    something like that? (Instead of setting long-term work I would simply sort by time)

    SELECT sql_id

    executions

    elapsed_time

    TO_CHAR (buffer_gets, '999G999G999G999G999') buffer_gets

    , "percent overall.

    TO_CHAR (buffer_ex, '999G999G999G999') buffer_ex

    TO_CHAR (rows_ex, '999G999G999G999') rows_ex

    TO_CHAR (buffer_gets_row, '999G999G999G999') buffer_gets_row

    sql_text

    FROM (SELECT sql_id

    executions

    elapsed_time

    sql_text

    buffer_gets

    , ROUND ((buffer_gets) ratio_to_report () * 100) '% overall.

    , buffer_gets / buffer_ex of executions

    , rows_processed / rows_ex of executions

    , buffer_gets / DECODE (rows_processed, 0, 1, NULL, 1, rows_processed) buffer_gets_row

    V $ sql

    WHERE executions > 0

    AND buffer_gets > 0

    Sql_id AND to (select sql_id in session $ v where status = 'ACTIVE'))

    WHERE the "Total %" > = 5

    OR buffer_ex > 1000

    OR buffer_gets_row > 8

    ORDER BY DESC elapsed_time;

    (I guess you can't use v$ sql_monitor, otherwise the answer.)

  • Compilation of a stored procedure that is frequently consulted

    RDBMS version: 10.2.0.4.0 in a 2 RAC node

    Our Production database is 24 x 7. Our development team has made a change in the code of the procedure frequently consulted.
    At some point this stored proc is accessible by at least 5 sessions.
    I was asked to compile this procedure with the new changes.
    Since this is a frequently viewed, I think that the only option I have left to compile this proc is stopped by the DB and launch it using
    STARTUP RESTRICT
    and then compile it. But, this procedure is actually headed by a DBMS_JOB, so even if I stop, when I restart, the work will resume i.e. that execution of the stored procedure. Right?

    I can't knock local listeners because they are listening to an another DB in the cluster.

    Is there another better way?

    ALTER system set job_queue_processes = 0 will stop the ease of use.

    You might also consider to define windows service and stop the practical execution of cowboy.

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • A query in the stored procedure

    Hello

    I use EXECUTE IMMEDIATE to run a DDL statement in a stored procedure.

    But I can't see this picture, please tell me why.


    create or replace procedure names
    is
    Start
    EXECUTE IMMEDIATE ' CREATE TABLE execute_table (col1 VARCHAR (10))';
    commit;
    end;
    */*

    Created procedure.

    You must perform the procedure as well; only for creating it does not table:

    BEGIN
     NAmes;
    END;
    
    OR 
    
    EXEC NAmes; (from SQL*PLUS)
    
  • Cannot configure DBAdapter to call the procedure that takes no parameters

    Hello

    I created a test as a package below:

    create or replace package Tester
    as
    Main1 procedure;
    procedure (x VARCHAR2) Main2;

    end;

    create or replace package body Tester
    as

    procedure Main1
    is
    Start
    insert into ziptest values (' Main', sysdate);
    commit;
    end;

    procedure (x VARCHAR2) Main2
    is
    Start
    insert into ziptest values (' in Main2 :'|| x, sysdate);
    commit;
    end;

    end;
    ----------------------------------------
    When I try to configure a DB adapter to call the Main1 procedure, that I'll meet with the following error:
    An error occurred while getting stored procedures. Verify that the database connection is valid.

    If I try to configure the DB adapter to call Main2, it works without problem.
    In addition, this occurs only when the procedure is in a package. If the procedure is independent, no error is delivered.

    Is this a known bug or am I missing something. I use Jdev 10.1.3.4 and SOA Suite 10.1.3.4.

    Kind regards

    Amit

    Hi Amit,

    This is a bug in the wizard of DBAdapter. Try to update BPEL for the latest available patch, and if this does not work here workaround has been tested to work on 10.1.3.1 too!

    1. modify "Main1' to"Main1 (dummy IN VARCHAR2)"in your package.
    2. use the wizard of DBAdapter as ususal to create a partner link that hits this procedure has changed.
    3. change your procedure "Main1" back to the way it was IE without any parameters.
    4. in your BPEL process file, find the file .xsd to Main1 generated by the wizard in step 2. Replace ... inside the for the "InputParameters" element with an emty tag.

    Now, go ahead and invoke this link partner as usual. It would work! ;)

    Kind regards
    Ravi

  • A query that takes too much time with the dates?

    Hello people,
    I'm trying to pull some data using the status date, and for somereason its taking too long to return the data
       and trunc(al.activity_date) = TRUNC (SYSDATE, 'DD') - 1     --If i use this its takes too much time
    
    
      and al.activity_date >= to_date('20101123 000000', 'YYYYMMDD HH24MISS')
       and al.activity_date <= to_date('20101123 235959', 'YYYYMMDD HH24MISS') -- If i use this it returns the data in a second. why is that?
    
    How do i get the previous day without using the hardcoded to_date('20101123 000000', 'YYYYMMDD HH24MISS'), if i need to retrieve it faster??

    It seems that al.activity_date is indexed and is not TRUNC (al.activity_date). Your problem is not with the TRUNC(sysdate,'dd')-1. So use:

    and al.activity_date >= TRUNC(SYSDATE)-1
    and al.activity_date < TRUNC(SYSDATE)
    
  • A database procedure call takes a long time, but the user is okay with it

    Is there a way to show a progress bar to the user type WITHOUT use javabeans to indicate the State of a process of database? I think that there is a timer to a description, can someone show code example please.

    The user is very though will be a process can take up to 10 minutes to run. (this is a batch routine treatment and involves many other procedures, etc. in the database to run)

    I am running:
    Forms [32 bit] Version 10.1.2.3.0 (Production)
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the options of partitioning and Data Mining
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.5.0 (Production)
    Oracle V10.1.2.3.0 - Production procedure generator
    PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
    Query Oracle 10.1.2.3.0 - Production Designer
    Oracle virtual graphics system Version 10.1.2.0.2 (Production)
    The GUI tools Oracle Utilities Version 10.1.2.0.2 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle tools integration Version 10.1.2.0.2 (Production)
    Common tools Oracle area Version 10.1.2.0.2
    Oracle CORE Production 10.1.0.5.0

    Create an element whose width is 100%, changing the Visual properties to show it as a bar.
    Show it on separate with a separate canvas window.
    Create a procedure that:
    -Change the length of your bar:
    SET_ITEM_PROPERTY ('', WIDTH, * 100);
    -Displays the window on the other side
    SHOW_WINDOW ('');
    -hide the window if is greater than or equal to 100
    HIDE_WINDOW ('');

  • Need to query to find missing months between two dates.

    A bank customer a monthly overview of databases (in the tens of millions of accounts)

    The data are sent with a line per account each month.  It is stored in a table called "ACCOUNTS_TAB".

    Fields on registration, which

    Column

    Description

    Example of format.

    * YRMTH-1

    Year and month of the snapshot

    6-character numeric, 4-digit year added to months of 2 digits, example 201301, 201311

    * AccountID

    Unique identifier for an account.

    Integer, example 100098322

    Opening balance - 1

    Initial account balance at the closing of the previous month

    $30000

    Closing balance - 1

    The account balance at the end of the month of closing

    $34200

    Class-1 relative to investments

    .....

    ...

    .....

    ......

    .....

    Many more columns, two favorites (*) columns are alone, that you will need for the query. There are no columns to tell when an account is closed, or has just opened, and not separate "master account" - you use this single table for your query that results.

    The table was in place from 200301, so many accounts have dozens of lines, if they have been open for many years and other only 1 or 2 ranks, if new.

    Write a query to give just a list of accountDs that meet the following criteria.

    1. 1) has a record for specific 201503
    2. 2) was also a record for the month specific 201602
    3. 3) missing one or several months between these two records.

    A good account which was opened from 201503 to 201602 inclusive would of course have lines for

    201503

    201504

    201505

    201506

    201507

    201508

    201509

    201510

    201511

    201512

    201601

    201602

    It's good to hardcode the month of departure (201503), end of month (201602) and the actual number of months between them (10 exclusive or 12 inclusive) as part of your query.

    Once again the account must meet all 3 criteria to be an account issue.  If only, they have a partial set of these documents but do not have the month of departure, or is not the end of the month, it is not a problem, only when they have so specified and end early and not a full between game.


    Help, please!

    Maybe this...

    -----

    -The Dataset for the test begins

    WITH dataset (ACCOUNT_NO, DATES)

    AS (SELECT 100, DOUBLE 201503

    UNION ALL

    SELECT 100, DOUBLE 201504

    UNION ALL

    SELECT 100, DOUBLE 201505

    UNION ALL

    SELECT 100, DOUBLE 201506

    UNION ALL

    SELECT 100, DOUBLE 201507

    UNION ALL

    SELECT 100, DOUBLE 201508

    UNION ALL

    SELECT 100, 201509 OF THE DOUBLE

    UNION ALL

    SELECT 100, DOUBLE 201510

    UNION ALL

    SELECT 100, 201511 OF THE DOUBLE

    UNION ALL

    SELECT 100, DOUBLE 201512

    UNION ALL

    SELECT 100, 201601 DOUBLE

    UNION ALL

    SELECT 100, DOUBLE 201602

    UNION ALL

    SELECT 200, DOUBLE 201503

    UNION ALL

    SELECT 200, DOUBLE 201504

    UNION ALL

    SELECT 200, DOUBLE 201505

    UNION ALL

    SELECT 200, DOUBLE 201506

    UNION ALL

    SELECT 200, DOUBLE 201508

    UNION ALL

    SELECT 200, DOUBLE 201509

    UNION ALL

    SELECT 200, DOUBLE 201510

    UNION ALL

    SELECT 200, DOUBLE 201511

    UNION ALL

    SELECT 200, DOUBLE 201512

    UNION ALL

    SELECT 200, 201601 DOUBLE

    UNION ALL

    SELECT 200, DOUBLE 201602

    UNION ALL

    SELECT 300, DOUBLE 201503

    UNION ALL

    SELECT 300, DOUBLE 201504

    UNION ALL

    SELECT 300, DOUBLE 201505

    UNION ALL

    SELECT 300, DOUBLE 201506

    UNION ALL

    SELECT 300, DOUBLE 201507

    UNION ALL

    SELECT 300, DOUBLE 201508

    UNION ALL

    SELECT 300, DOUBLE 201509

    UNION ALL

    SELECT 300, DOUBLE 201510

    UNION ALL

    SELECT 300, DOUBLE 201511

    UNION ALL

    SELECT 300, 201601 DOUBLE

    UNION ALL

    SELECT 300, DOUBLE 201602

    UNION ALL

    SELECT 400, DOUBLE 201504

    UNION ALL

    SELECT 400, DOUBLE 201505

    UNION ALL

    SELECT 400, DOUBLE 201506

    UNION ALL

    SELECT 400, DOUBLE 201507

    UNION ALL

    SELECT 400, 201508 DOUBLE),

    -The Dataset to test ends

    -Hand with clause begins

    ResultSet

    AS (SELECT account_no,

    CASE

    WHEN COUNT)

    CASE WHEN dates IN (201503, 201602) THEN 1 END)

    COURSES (PARTITION BY account_no) = 2

    AND (COUNT (DISTINCT SUBSTR (dates, 4)))

    COURSES (PARTITION BY account_no) = 12

    OR COUNT (DISTINCT SUBSTR (dates, 4))

    COURSES (PARTITION BY account_no)<>

    AND COUNT (DISTINCT SUBSTR (dates, 1, 4))

    (PARTITION BY account_no) > 1

    THEN

    « Y »

    ON THE OTHER

    « N »

    END

    FLG

    THE dataset---> replace with your table name

    GROUP BY account_no, dates)

    SELECT DISTINCT Account_no

    FROM THE result set

    WHERE flg = 'Y ';

    -Hand with the ends of the clause

    ACCOUNT_NO

    -----------------------

    100

    300

    200

    See you soon,.

    Manik.

  • need to query to find repeating values, please help

    I need assistance with SQL or what you think are the best way to do it, maybe PL/SQL.

    Basically it like that, in the 10G database, there are two address field:

    ADDESS_DELVRY - mailing address for example would be stored here
    ADDESS_DELVRY2 - building to apartments, away or PBM number would be stored here

    but sometimes I see the apartment B-123 in these two areas, so I need to find the duplicates, if there is a way.

    Thus, for example:

    ADDESS_DELVRY - 123 Elm Street Apartment 2B
    ADDESS_DELVRY2 - apartment 2B

    It's a problem, because then the apartment is printed twice on the mail piece. I think there is a small percentage who have this problem and I'm trying to find the best way to their ID, maybe use REG_EXP?

    Not sure, please help, thanks!

    Kodiak_Seattle wrote:
    If there is no luck there is a % or _ how is the request?

    SELECT *.
    FROM table_x
    WHERE the address_delvry LIKE "| address_delvry2;

    ?

    Nothing found.

    ATTENTION: you need the Joker '% '.

    The above condition is identical to

    WHERE   address_delvry = address_delvry2
    

    Try it with the wildcard '% ':

    WHERE   address_delvry LIKE '%'  -- The % is very iomportant!
            || address_delvry2
    

    I think that the suggestion of Srini (INSTR) will be more effective, if a little more complicated to code.

Maybe you are looking for

  • Question about iCloud upgrade?

    Hi all. Uses iPhone running on iOS 9.0.2. Intend to start to use iCloud for it services mainly: get my contacts to my address book on my iMac [mid-2011 running on Yosemite 10.10.4]. I have a backup of my contacts phone in iCloud, but these data are n

  • Why my browser keep crashing?

    For days now my firefox browser crashes constantly, at intervals of 1 to 20 minutes. I've updated everything (windows, firefox etc.) checked plug-ins, etc. scan viruses, but it always crashes repeatedly. Any ideas? I get to the point where I have to

  • How to stop apps in IOS 9.3?

    I have the iPad Mini 3. With the IOS earlier, I can bring the multiscreen stacked indicating the applications that are open. I can just 'X', the apps I want closed. However, I don't see that the 'X' on the stacked IOS multiscreen 9.3.

  • It will never be a BBC iPlayer app for Apple TV 3?

    Hey there. Anyone of you knows it or speculate may or may not be a real demand for BBC iPlayer for Apple TV 3rd generation? Since its launch on the new Apple TV 4, I wonder why she is absent from the old model. Watching the news, I noticed how HBO no

  • My computer again new hardware found

    And then he said: CD-ROM drive, now I don't know why it is said that because my CD drive is not new, so I don't know why it is not save that that there is nothing in there. It will not sign up to any CD, I put in there.