Retriving all records in table

Hello

To retrieve all records from the table, procedure below has been used, but the performance gets only a single record in the output.

Procedure (proc_env) has been wrapped into the package (packg)

This package gets the call from the java environment to extract all records in the table.

Procedure wrapped in packaging
--------------------------------------------------

PROCEDURE proc_test (cursor1 OUT TestCursor)
IS
BEGIN
OPEN FOR Cursor1
SELECT col1,
col2,
COL3
Table_name FROM
END;


procedure called for execution
-----------------------------------------
DECLARE
v_col1 table.col_name%TYPE;
v_col2 table.col_name%TYPE;
v_col3 table.col_name%TYPE;
v_cur packg. TestCursor;
BEGIN
packg.proc_test (v_cur);
EXTRACT the v_cur IN v_col1, v_col2, v_col3;
DBMS_OUTPUT. ENABLE;
Dbms_output.put_line (v_col1 |) ',' || v_col2 | «, » || v_col3);
END;
/


How to retrieve all the records in the table?


What is missing in the code?


Regarding
SET SERVEROUTPUT ON
DECLARE
    v_col1 table.col_name%TYPE;
    v_col2 table.col_name%TYPE;
    v_col3 table.col_name%TYPE;
    v_cur packg.TestCursor;
BEGIN
    DBMS_OUTPUT.ENABLE;
    packg.proc_test(v_cur);
    LOOP
      FETCH v_cur INTO v_col1,v_col2,v_col3;
      EXIT WHEN v_cur%NOTFOUND;
      DBMS_OUTPUT.put_line(v_col1||','||v_col2||','||v_col3);
    END LOOP;
    CLOSE v_cur;
END;
/

SY.

Tags: Database

Similar Questions

  • How replicates all records from one table to another table without using expdp, impdp

    Hi I have two database in a database, that I have a table called t1 and another base data, I have the second table .so, my first table have records, that I need to transfer all records second T2 without use of expdp and impdp in every 5 min... what I do

    ??

    The best solution for this scenario is to use Oracle Golden Gate

    However, it requires a license, and you must pay for it.

    If this is not possible, you can create a job scheduler that uses a link DB in order to reproduce the recordings of the target database, but it will take the entire table to the target database and then INSERT AS SELECT truncate the data of the entire table every time that the job is running (because you can't follow only the records that have been changed or modified).

    In addition, read here on the replication of data using materialized views.

  • Insert all records from a custom to a staging table.

    Hello

    Is it possible to insert all records of a cursor in a custom table using plsql instead of open a cursor, and each record in a loop?

    Thank you

    KK

    Use INSERT INTO your_staging_tbl... SELECT... Of your_cuatom_tbl

  • Request covered all records using years as refrence

    Hi all

    My problem came as sequence of another thread, I've created here in the forum: analytical - features grouping of years
    All the proposed solutions were very useful, but not perfect one.

    Although I found a solution to this problem that doesn't involve creating a query, I came back with a similar situation with a need for the query. I'll try to better explain the issue.

    I have my data like this sample
    WITH dis AS (SELECT   1 AS COD,
                          'A' AS uc,
                          1977 AS initial_year,
                          2002 AS end_year,
                          10024 AS pe_codigo
                   FROM   DUAL),
        cred AS (SELECT   100 AS id,
                          'A' AS uc,
                          1982 AS initial_year,
                          1982 AS end_year,
                          2 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL
                 UNION ALL
                 SELECT   200 AS id,
                          'A' AS uc,
                          1986 AS initial_year,
                          1986 AS end_year,
                          7 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL
                 UNION ALL
                 SELECT   300 AS id,
                          'A' AS uc,
                          1988 AS initial_year,
                          1988 AS end_year,
                          4 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL
                 UNION ALL
                 SELECT   55 AS id,
                          'A' AS uc,
                          1989 AS initial_year,
                          1989 AS end_year,
                          3 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL
                 UNION ALL
                 SELECT   330 AS id,
                          'A' AS uc,
                          1990 AS initial_year,
                          1990 AS end_year,
                          4 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL
                 UNION ALL
                 SELECT   102 AS id,
                          'A' AS uc,
                          1991 AS initial_year,
                          1991 AS end_year,
                          6 AS credits,
                          10024 AS pe_codigo
                   FROM   DUAL)
    -DIS is a table with many distinct pairs of UC/PE_CODIGO.
    -Table CRED have some additional data of each UC/PE_CODIGO. Each UC/PE_CODIGO may have one or more records with different INITIAL_YEAR and END_YEAR (and credits).

    What I need?
    -J' I need a query that returns all records, joining the two tables by PE_CODIGO and UC is, and covering the range of years that's on the table, SAY. In this example, I want to record from the year 1977 until 2002.
    Using this rule (and this example) I want a record between 1997 and 1981, between 1982 and 1982, others from 1983 to 1985, from 1986 until 1986, and so on like this:
    COD    ID    UC     initial_year    end_year    credits    pe_codigo
    1    NULL     A        1977            1981         NULL       10024
    1    100      A        1982            1982         2          10024
    1    NULL     A        1983            1985         NULL       10024
    1    200      A        1986            1986         7          10024
    1    NULL     A        1987            1987         NULL       10024
    1    300      A        1988            1988         4          10024
    1    55       A        1989            1989         3          10024
    1    330      A        1990            1990         4          10024
    1    102      A        1991            1991         6          10024
    1    NULL     A        1992            2002         NULL       10024
    Notes:
    -TELL is considered to be a "pivot table". I only need chronogram SAY. Coming INITIAL_YEAR.
    -END_YEAR (in both tables) can have a NULL value
    -When I have no records in the table CRED with years between, the credits column must be a null (not NULL as String). And Yes ID column.
    -One END_YEAR must have (not NULL as String) NULL values.

    The best I can go it is with this query:
    SELECT   a.cod,
             b.id,
             b.uc,
             b.initial_year,
             LEAST (
                 b.end_year,
                 LEAD (b.initial_year)
                     OVER (PARTITION BY b.uc ORDER BY b.initial_year)
                 - 1)
                 end_year,
             b.credits,
             a.pe_codigo
      FROM   cred b, dis a
     WHERE       a.uc = b.uc
             AND a.pe_codigo = b.pe_codigo (+)
             AND a.end_year >= b.initial_year
    COD      ID     UC     initial_year    end_year    credits    pe_codigo
    1     100     A     1982              1982             2     10024
    1     200     A     1986              1986             7     10024
    1     300     A     1988              1988             4     10024
    1     55      A     1989              1989             3     10024
    1     330     A     1990              1990             4     10024
    1     102     A     1991                          6     10024
    I have different scenarios in the CRED table. But I only need a query which can multiply records between SAY. INITIAL_YEAR and SAY. END_YEAR based in the information I have in the CRED table.

    Sorry for the long explanation.
    Can someone help me, please?
    Thank you
    Filipe Almeida

    Published by: Filipe_Almeida on ago 10/2011 08:09

    Hi, Filipe,

    The results you want with these new data sample even as the results that you have published with the latest data from the sample?

    Filipe_Almeida wrote:
    The line with COD = 2 is a different record that cod = 1. Have the same value of UC, but have a different PE_CODIGO. So it is another record.

    Yes, it's another record. This is exactly why I don't understand why you want to see cod = 1 in the output for the line where pe_codigo = 10000.

    If you wish, you can put 'B' in the column of the CPU for recording with COD = 2...

    You say there is a line in the output with the cod = 2? In the results of the sample you have validated, cod = 1 on all lines. Mayber, you need to verify that the results are accurate and post the correct results if they are not.

    in tables DIS1 and DIS2 and ID = line 150 CRED table, as well.

    Sorry, I'm dion can't understand this. In the examples of new data, is not uc = 'A' for all rows in all tables? Why is - it normal to have a CPU = "B" in the output?

    END_YEAR = NULL means that, after INITIAL_YEAR, UC, this number of credits to infinity. For example (using DIS2), UC = 'A' with PE_CODIGO = 10024, in the year 2011 or the year 9999 is worthless credits. The same CPU, but in the year 1989 have 3 credits. But the year 1984 have no credit.
    This END_YEAR cannot be NULL when we value END_YEAR DIS table for this specific/PE_CODIGO CPU. In this case the recordset must be completed this year.

    I see it; you want to treat a NULL end_year as impossibly high, all year effective at the latest. As my last request was written, it is only a matter then generate a fictitious line dated after the last row of the cred. I did it in the query below, by chaniging

    df.end_year
    

    TO

    NVL (df.end_year, 9999)
    

    in the last part of the UNION. Find the comment "CHANGED" very near the end.

    WITH       prev    AS
    (
         SELECT     dp.cod
         ,     cp.id
         ,     dp.uc
         ,     1 + LAG ( cp.end_year
                       , 1
                       , dp.initial_year - 1
                   ) OVER ( PARTITION BY  cp.uc
                                ,            cp.pe_codigo
                         ORDER BY      cp.initial_year
                          )       AS initial_year
         ,       cp.initial_year - 1    AS end_year
         ,     NULL                 AS credits
         ,     cp.pe_codigo
         FROM    cred    cp
         JOIN     dis     dp  ON      cp.pe_codigo     = dp.pe_codigo
                       AND      cp.end_year   >= dp.initial_year
    )
    SELECT       *
    FROM       prev
    WHERE       initial_year     <= end_year
           --
        UNION ALL
               --
    SELECT       dc.cod
    ,       cc.id, dc.uc
    ,        GREATEST ( cc.initial_year
                   , dc.initial_year
                 )                    AS initial_year
    ,       NVL (cc.end_year, dc.end_year)     AS end_year
    ,       cc.credits, cc.pe_codigo
    FROM      cred  cc
    JOIN       dis     dc  ON   cc.pe_codigo     = dc.pe_codigo
                  AND      COALESCE ( cc.end_year
                                   , dc.end_year
                          , dc.initial_year
                               )         >= dc.initial_year
           --
        UNION ALL
               --
    SELECT       df.cod
    ,       NULL               AS id
    ,       df.uc
    ,       1 + MAX (cf.end_year)     AS initial_year
    ,       df.end_year
    ,       NULL               AS credits
    ,       df.pe_codigo
    FROM      cred  cf
    JOIN       dis     df  ON   cf.pe_codigo     = df.pe_codigo
    GROUP BY  df.cod
    ,            df.uc
    ,       df.pe_codigo
    ,       df.end_year
    HAVING       MAX (cf.end_year)     < NVL ( df.end_year          -- CHANGED
                                    , 9999
                              )
           --
    ORDER BY  7       -- pe_codigo
    ,            4       -- initial_year
    ;
    
  • All records in the report need when I downloaded to Excel

    Hello
    for all my reports (Adhoc, canned), I need to display 25 records in the page, and if I download the results to excel I want that all the records in excellent.

    I use the below configurations in my file.it instanceconfig works very well for the number of records for each page. But if I download the report, it's download only 25 records that are playing on this perticular page.

    Someone tell how can I download all records in excellent with 25 records per page?

    < Center >
    < > 10020000 MaxCells < / MaxCells >
    < MaxVisibleColumns > 30 < / MaxVisibleColumns >
    < MaxVisiblePages > 1000 < / MaxVisiblePages >
    < MaxVisibleRows > 64000 < / MaxVisibleRows >
    < MaxVisibleSections > 25 < / MaxVisibleSections >
    < DefaultRowsDisplayed > 25 < / DefaultRowsDisplayed >
    < DefaultRowsDisplayedInDelivery > 75 < / DefaultRowsDisplayedInDelivery >
    < defaultRowsDisplayedInDownload > 64000 < / DefaultRowsDisplayedInDownload >
    < DisableAutoPreview > false < / DisableAutoPreview >
    < / Center >
    < table >
    < > 10020000 MaxCells < / MaxCells >
    < MaxVisiblePages > 1000 < / MaxVisiblePages >
    < MaxVisibleRows > 64000 < / MaxVisibleRows >
    < MaxVisibleSections > 25 < / MaxVisibleSections >
    < DefaultRowsDisplayed > 25 < / DefaultRowsDisplayed >
    < DefaultRowsDisplayedInDelivery > 75 < / DefaultRowsDisplayedInDelivery >
    < defaultRowsDisplayedInDownload > 64000 < / DefaultRowsDisplayedInDownload >
    < /table >

    Published by: user12077461 on August 9, 2011 18:14

    He shud behave similarly... I mean all the files shud be downloaded. You can try this in any other envn? UAT or DEV?

    I'm 100% sure that it shud download all...

  • need help writing records in tables multipul delete trigger

    I am trying to write a trigger that might help me to delete the record from 3 different tables

    Let's say I table a, b and c

    I have one is trying to write a trigger that might help me to delete the record of table has and c.


    Drop trigger az_zzz_trigger;
    create trigger az_zzz_trigger
    before INSERT or update or DELETE ON az_employ
    FOR EACH LINE

    BEGIN
    IF REMOVE then
    remove from za_payroll
    remove from az_salary_audit
    end if;
    end;
    /


    during the execution of this trigger is delete all the data in the za_payroll table.

    What should I do so that only the record that I delete az_employ is removed from az_payroll and az_salary_audit

    872959 wrote:
    I am trying to write a trigger that might help me to delete the record from 3 different tables

    Let's say I table a, b and c

    I have one is trying to write a trigger that might help me to delete the record of table has and c.

    Drop trigger az_zzz_trigger;
    create trigger az_zzz_trigger
    before INSERT or update or DELETE ON az_employ
    FOR EACH LINE

    BEGIN
    IF REMOVE then
    remove from za_payroll
    remove from az_salary_audit
    end if;
    end;
    /

    during the execution of this trigger is delete all the data in the za_payroll table.

    What should I do so that only the record that I delete az_employ is removed from az_payroll and az_salary_audit

    use the appropriate WHERE clause

  • Multiple selection of records in table advanced to update in the Search Page.

    Hi all

    I write the code below, to select multiple records in table advanced for the update after clicking on the button update in the Search Page.
    I write this code in Processform request, but I got the exception when I run the code below.


    If (PageContext.GetParameter ("UpdateOnSeaBtn")! = null)
    {
    Am = (XxSupppacklistAMImpl) pageContext.getApplicationModule (webBean) XxSupppacklistAMImpl;
    am.saveRollback ();
    OAViewObjectImpl upDtVO = (OAViewObjectImpl) am.findViewObject ("PackingListSeaVO");
    PackingListSeaVORowImpl line;

    HashMap vParm = new HashMap();

    Row [] rows = upDtVO.getFilteredRows ("SingleSelection", "Y");
    int fetCount = upDtVO.getRowCount ();
    System.out.println ("Teh recovered rowcount is:," + fetCount);

    RowSetIterator multiIter;
    multiIter = upDtVO.createRowSetIterator ("multiIter");
    multiIter.setRangeStart (0);
    multiIter.setRangeSize (fetCount);


    for (int i = 0; i < fetCount; i ++)
    {
    Row = (PackingListSeaVORowImpl) multiIter.getRowAtRangeIndex (i);
    If (Row.GetAttribute ("SingleSelection")! = null)
    {
    If (Row.GetAttribute ("ItemNumber")! = null)
    {
    Object vitemNum = row.getAttribute ("ItemNumber");
    System.out.println ("The selected element Num is:," + vitemNum);
    vParm.put ("ItemNumber", vitemNum);

    pageContext.setForwardURL ("OA.jsp?page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG", / / here, I got the exception below)
    NULL,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    NULL,
    vParm,
    false, / / RetainAM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    }
    }
    }

    multiIter.closeRowSetIterator ();

    }
    }
    }

    could you, please, can someone help on this.


    I got below exception to the side server when it is run the code above.
    Error (125,48): method setForwardURL (java.lang.String, null, null, byte, java.util.HashMap, boolean, java.lang.String, byte) is not not in the interface oracle.apps.fnd.framework.webui.OAPageContext

    Kind regards

    Hello

    832859 wrote:

    for (int i = 0; i)<>
    {
    Row = (PackingListSeaVORowImpl) multiIter.getRowAtRangeIndex (i);
    If (Row.GetAttribute ("SingleSelection")! = null)
    {
    If (Row.GetAttribute ("ItemNumber")! = null)
    {
    Object vitemNum = row.getAttribute ("ItemNumber");
    System.out.println ("The selected element Num is:," + vitemNum);
    vParm.put ("ItemNumber", vitemNum);

    > pageContext.setForwardURL"OA.jsp.page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG",//here I got below exception

    NULL,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    NULL,
    vParm,
    false, / / RetainAM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    }
    }
    }

    -Here is you call pageContext.setForwardURL loop.
    >

    I got below exception to the side server when it is run the code above.
    Error (125,48): method setForwardURL (java.lang.String, null, null, byte, java.util.HashMap, boolean, java.lang.String, byte) is not not in the interface oracle.apps.fnd.framework.webui.OAPageContext

    -check 5th param should nt be vParm if it is null

    Finally... After the for loop ends call... y bcz assume this page grouped 10 rows can he navigate both on the next page...:

    pageContext.setForwardURL ("OA.jsp?page=/xxfls/oracle/apps/po/packlist/webui/XxSuppalistcrealistPG",
    NULL,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    NULL,
    NULL,
    false, / / RetainAM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    }

    Concerning
    Meher Irk

    Published by: Meher Irk on March 31, 2011 19:54

  • Update or delete all records

    Hello world!

    Im making a site with PHP and wonder if I can do this:

    First: Let's say the db has 30 records in a table, and I want to change a particular data in all records. How can I do this?

    Second: In the same how can way, I delete all the records in this table?

    For example:

    table 'example '.

    collar ID, title, content, description

    If I want to ' reset "(changer sa valeur à zéro, par exemple) 'description' value in all records in the table, how can I do this?".

    And the second: How can I truncate the whole table? (TRUNCATE = empty all the data inside the table, right?)

    All this PHP, phpmyadmin lol no!

    Thanks in advance

    See you soon!

    As I said in the previous answer: use the UPDATE and DELETE MySQL commands. Look at em room for examples. There are a lot of examples out there that will do what you want. Basic examples are:

    UPDATE table_name SET column_name = something, column_name_2 = sometingelse

    or

    DELETE FROM tbl_name where field = something.

  • Second update statement is not updated all records

    Hello

    I've written a procedure for updating a table "REFDUMP". The second statement to update the id of the procedure does not update all records. It updates only few records about 3500 off 15967.

    Please can someone help me in this.


    create or replace PROCEDURE refdump1
    AS
    cursor c1 is select r.REF_QUARTER, q.QUARTER, r.reference_date, refdump r.created r, q quarter
    where nvl (r.reference_date, r.created) = q.REFERENCE_DATE;

    cursor c2 is select r.REFnom_QUARTER, q.QUARTER, r.NOMINATION_DATE, refdump r.created r, q quarter
    where nvl (r.nomination_date, r.created) = q.REFERENCE_DATE;

    SLIDER C3 is SELECT * FROM country_region;



    BEGIN
    BEGIN
    I'm looping c1
    UPDATE refdump
    SET ref_quarter = i.quarter
    WHERE (reference_date, CREATED) = nvl nvl (i.reference_date, i.created);
    COMMIT;
    end loop;
    EXCEPTION WHEN others then
    DBMS_OUTPUT. Put_line (' error in the update of the quarter Ref');
    END;

    BEGIN
    I'm looping c2
    UPDATE refdump
    SET refnom_quarter = i.quarter
    WHERE the NVL (nomination_date, CREATED) = NVL (i.nomination_date, i.created);
    COMMIT;
    END LOOP;
    EXCEPTION WHEN others THEN
    DBMS_OUTPUT. Put_line ('error in the update of the quarter of nomination');
    END;

    BEGIN
    UPDATE refdump SET oracle_ovi = 'other '.
    WHERE oracle_ovi is null.
    COMMIT;
    END;

    BEGIN

    I'm looping c3
    UPDATE refdump SET country = i.country_name2, region_cluster = i.region_cluster, region = i.region
    Superior WHERE (countries) in (upper (i.country_name), upper (i.country_name2));
    COMMIT;
    END LOOP;
    END;

    BEGIN
    UPDATE refdump SET country = 'other '.
    WHEN the country is null;
    COMMIT;

    UPDATE refdump SET region_cluster = region, region = substr (region, 1, instr(region,'-') - 2).
    Countries WHERE = "other";
    END;

    END;


    Thank you
    Vikas
  • How can I pay what columns appear on all records when windows Explorer opens?

    original title: Windows Explorer in Vista

    How can I configure how windows Explorer opens?

    How can I pay what columns appear on all records when windows Explorer opens?

    Why vista is so frustrating use?

    Hi SuppyLives,

    You experience problems in the customization of Windows Explorer?

    Method 1: You can run the fixit available in the link below and then check

    Diagnose and repair Windows files and folders problems automatically

    http://support.Microsoft.com/mats/windows_file_and_folder_diag/en-us?EntryPoint=lightbox

    Method 2:  You can see the steps provide in the article below

    How to modify your folder view settings or customize a folder
    http://support.Microsoft.com/kb/812003

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base.
    How to back up and restore the registry in Windows

    You might want to know

    Work with files and folders
    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders#section_2

    Demo: Working with files and folders
    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-working-with-files-and-folders

  • CAN NOT MAKE RECORDS OR CHANGE THE NAMES OF FILE 0N ALL RECORDS

    CAN NOT DO ALL RECORDS IN THE ACCOUNTS - CAN NOT DO ANY CORRECTION ON FOLDERS-PRESS FOIDER ICON BUT NO ACTION OR HOW TO CHANGE THE NAME OR INFORMATION ABOUT THE FILES

    What happened a bit in the past, but we see a lot more often recently. Here are two options.
     

    How to remove and restore the default context Menu items 'New' in Windows 7 and Windows 8
    http://www.SevenForums.com/tutorials/28677-new-context-menu-remove-restore-default-menu-items.html
     
     

    Tip: When you save the text in Notepad, the default file format is .txt. Replace all files.
     

     
  • All records have selected read-only option, and I am unable to remove it.

    I have recently reinstalled Windows 7, without touching the drive was in my data. All data is intact, but for all delete them and move the action, it seems to be asking permission from the Admin. In addition, another major problem, that I have been facing is that all records are in read-only mode, and no matter how many times I change, they simply revert to the original read-only mode. I have attached a few screenshots showing the process. Is it possible to fix this? I also copied the content into new folders I created recently, but they still have the same read only selected option. (http://imgur.com/a/r3VOB#0)

    The read-only check box is always blue filled.

    The explanation lies in http://support.microsoft.com/kb/326549

  • What type of reporting, we can do on CDO and is it mandatory to have all records in CDO to map with contacts to appear in reports?

    Hello

    What type of reporting, we can do on CDO and is it mandatory to have all records in CDO to map with contacts to appear in reports?

    Any ideas?

    Thanks in advance

    Hello

    It is perhaps not necessary to map contacts but in case you need activity report too, so it must be mapped.

    To implement a reporting for the CDO, by clicking here.

    After you click here, you will get an option to add several LCO for reporting. And you can get the report here. After the addition of CDO to report, it takes 10 minutes to reflect changes in insight.

  • A group of substrings of a string of search and display all records

    Hello

    I'm using Oracle 11 g.

    I store multiple values in a column, separated by delimiter(#@#). I know it's wrong to databases, but since it is used for many years I can't do much.

    I need to perform a search operation where I pass multiple values and I should get all records if any of a value match the stored value. I read about regular expressions for this kind of scenario.

    Can someone guide me how to proceed with this? Thanks in advance.

    Thank you

    Hello

    How about this? I tried to simplify your function. I don't know if I got your needs just fine.

    CREATE OR REPLACE FUNCTION Search_MultiValue (p_Name IN Varchar2, v_Name in Varchar2, p_delimiter IN VARCHAR2 DEFAULT ',') RETURN Number IS
    v_delimiter VARCHAR2(3) := '#@#';
    BEGIN
        RETURN CASE WHEN REGEXP_INSTR(v_delimiter || p_Name || v_delimiter
                                    , REPLACE(v_delimiter ||v_Name || v_delimiter, p_delimiter, '|') )  > 0
                                  THEN 1
                                  ELSE 0
                      END;
    END;
    /
    
    SELECT search_multivalue('ABC#@#DEF#@#GHI#@#JKL','ABC,GHI') AS res
    FROM dual;
    

    RESULT:

    1

  • Match any record of all records in OBIEE 11 g

    Hello

    I have a requirement which, with 4, conditions and should have the conditional formatting.

    Open_Flag, empno, month, count_flag are columns that I use.

    When Open_Flag = 'n' for any record in the month it will be red in all cases.

    Else count (case when count_flag = 'Y', then empno) count (empno) and apply the conditional formatting on the number of result as < 10 then green and > 20 then < 20 yellow and red.

    Is there anyway that I can reach the requirement on the side of report? How can I check the Open_flag = 'Y' condition for all records, if not, I have to go for other conditions?

    Thank you

    Prasanna

    Hello

    You can use a condition like this

    case when County (filter ("empno" Using "open_flag = ' n '") per month) > 0, then count of red one (empno using open_flag = 'Y') end

    Thank you

    R

Maybe you are looking for