Create stored procedure

Hi, I create my first stored procedure and really need help... I managed to set up the following:

CREATE or REPLACE PROCEDURE DRL_PROCEDURE (var_SOURCE_OBJECTID IN varchar2, var_NEW_OBJECTID OUT varchar2)
IS
var_temp_newobjectid varchar2 (20);
BEGIN
SELECT MAX (NEW_OBJECTID)
IN var_temp_newobjectid
OF DRL_CONVERSION
WHERE SOURCE_OBJECTID = var_SOURCE_OBJECTID;

var_NEW_OBJECTID: = var_temp_newobjectid;
return;
END;

I don't know if this is correct, however, I tried running with the following text, but when it does not perform any results show... it just says: procedure completed successfully:

RETVAL VARIABLE VARCHAR2 (20)
EXEC DRL_PROCEDURE('ab',:RETVAL);

Do I need to change somehow to show the result?
Also if you know how I can call the procedure in c# and show the result in this way which would be useful... Thank you

Hi and welcome to the forums!

The last step, you forgot to PRINT your result. See the example below:

SQL> CREATE OR REPLACE PROCEDURE TEST_PROC
  2  (
  3          pOwner  IN VARCHAR2
  4  ,       pCnt    OUT VARCHAR2
  5  )
  6  AS
  7  BEGIN
  8          SELECT  COUNT(*) INTO pCnt
  9          FROM    ALL_OBJECTS
 10          WHERE   OWNER = pOwner;
 11  END;
 12  /

SP2-0804: Procedure created with compilation warnings

SQL> VAR result NUMBER;
SQL> EXECUTE TEST_PROC(USER,:result);

PL/SQL procedure successfully completed.

SQL> PRINT result

    RESULT
----------
      7090

In addition, you don't need the VAR_TEMP_NEWOBJECTID variable. You can SELECT... IN VAR_NEW_OBJECTID instead.

HTH!

Tags: Database

Similar Questions

  • Execution of the stored procedure Oracle EF6 error.

    Hello

    Need help with the oracle error

    {"ORA-06550: line 1, column 8:"}

    PLS-00306: wrong number or types of arguments in the call to "sp_name".

    ORA-06550: line 1, column 8:

    {"PL/SQL: statement ignored '}

    This error occurs when the code runs the line in Vb.net application in Model Designer

    MyBase.ExecuteFunction ("sp_name" para1, para2, para3, dOBpara4, para5)

    I create the SSDL and CSDL, MSL files for oracle to MS SQL connection by the method mentioned in the link JasonShort - professional profile - CodeProject it worked perfectly fine without the stored procedures. I managed to insert, update, and delete records. Then, I created stored procedures for Insert, Update, Delete. It worked fine with MS SQL. I copied and updated oracle files respectively. I gives me the error mentioned above.

    I executed stored procedures in Oracle SQL Developer, and it works without error. But when it is executed via the model there is light of the error. Can anyone let me know the solution for this error. I'm using VS2010, EF6, Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Thank you

    Prachin Soparkar

    Hello

    Sorry for the inconvenience. After I posted this question I took a break and saw that the error was nothing, but I had given FNAME as parameter name in MS SQL. In oracle when I created the sp I created the parameter with p_FNAME. Where the schema defined in the language SSDL and CSDL, MSL had to be changed to MS, but since I want to that it would be same in different databases, I choose to have changed it in oracle stored procedure. The error msg is confusing, it should be something not found parameter or incompatibility etc.

    Thank you

    Prachin Soparkar

  • Is it possible to move an Oracle null input parameter to a stored procedure

    I have a stored procedure taking 3 inputs and 1 output of donne. I use the Oracle parameter to add all the input parameters 3 as follows:

    OracleParameter = cmd inobj. Parameters.Add ("wid", OracleDbType.Int32, 50);
    inobj. Direction = ParameterDirection.Input;
    inobj. Value = _employeeID;

    and the addition of the setting of output as follows:

    OracleParameter outobj is _cmd. Parameters.Add ("w_first", OracleDbType.Varchar2, 50);
    outobj. Direction = ParameterDirection.Output;

    On the side of the user interface, the user has the option of providing 1 entry or all inputs or any 2 based on his interest. Stored proc looks like this:
    SP (inp1 in parameter, inp2 in inp3 in parameter, parameter, out parameter output1)

    If I just get 1 or 2 entries of the user, it is very good query output data using the same stored procedure or do I create stored procedures for each scenario (combination of different entries)?

    I get an error in pl/sql which indicates the invalid number of arguments?

    Maybe I can be more clear with c# code. :)

    void SaveSomethingInOracle(int param1, string param2 = null, decimal? param3 = null)
    {
    // Set up your oracle connection and query here
    OracleParameter inobj = _cmd.Parameters.Add("w_id", OracleDbType.Int32,50);
    inobj.Direction = ParameterDirection.Input;
    inobj.Value = param1;
    
    OracleParameter inobj2 = _cmd.Parameters.Add("name", OracleDbType.Varchar2,50);
    inobj2.Direction = ParameterDirection.Input;
    inobj2.Value = param2;
    
    OracleParameter inobj3 = _cmd.Parameters.Add("quantity", OracleDbType.Decimal,50);
    inobj3.Direction = ParameterDirection.Input;
    if (param3.HasValue)
    {
    inobj3.Value = param3.Value;
    }
    else
    {
    inobj3.Value = null;
    }
    }
    

    This c# method takes 3 parameters. The first is necessary, the other two are optional. If you do not set them, they take the value default null and passing it to the database. If you want to set the first and third only, you can still pass null as the other. If you have this piece of code to call the stored procedure any combination of parameters that you use, and the proc will get values or NULL values properly.

    Hope he says. You need only one together code to do what you want to do. :)

    Published by: Tridus on December 19, 2012 12:10

  • dbms_job. Submit insertion values in a table using stored procedure

    values are inserted into a table by using the stored procedure by using the sequence and creating a job to trigger after every 10 seconds...

    create table test (collar number);

    table created.

    create sequences seq_test
    start with 1
    Increment 1;

    order of creation.

    create or replace procedure sp_test is
    Start
    loop
    Insert into test values (seq_test.nextval);
    end loop;
    commit;
    end;

    created stored procedure

    Report the number of jobno;
    BEGIN
    DBMS_JOB. SUBMIT)
    jobs = >: jobno.
    This = > 'sp_test;',
    next_date = > TRUNC (SYSDATE + 1/1440).
    interval = > 'SYSDATE + 10/86400',.
    no_parse = > TRUE
    );
    COMMIT;
    END;

    stored procedure created successfully



    every thing is done, but why the feature is always wrong...
    Please help me

    Hello

    Lucien wrote:
    ...
    create or replace procedure sp_test is
    Start
    loop
    Insert into test values (seq_test.nextval);
    end loop;
    commit;
    end; ...

    Have you tested this procedure first? It has an infinite loop. If this is the case, it's inserting row after row in the table, but never to commit, because he never leaves the loop.

    It seems that what you posted is a much simplified version of what you really do. Simplify things for posting on this forum is a good idea, but this one is so simple that I don't see the point of it, so I can't offer a better way to do. Maybe you shouldn't have a loop in the process. Whatever you do, test it before you submit it as a job.

  • Creating classic report to the stored procedure.

    How can we create a report based on a stored procedure out parameter.

    Can someone please help.

    Thank you

    Nani.

    Nani4850 wrote:

    Out parameter is a multi-level object type.

    I found a way to sort of basis a report on the parameter OUT procedure. The approach is:

    1. call the procedure in a process before PL/SQL areas, convert the object returned in an XML document and store in a collection XMLType column:

    declare
    
      k_rate_query varchar2(255) := 'RATE_QUERY';
    
      l_rate_type_code  number;
      l_rate_query      rate_rec;
      l_xml             xmltype;
    
      l_seq_id number;
    
    begin
    
      l_rate_type_code := to_number(:p1_rate_type_code);
      api_pkg.rate_query(l_rate_type_code, l_rate_query);
      l_xml := xmltype.createXML(l_rate_query);
    
      if not apex_collection.collection_exists(k_rate_query)
      then
        apex_collection.create_collection(k_rate_query);
      end if;
    
      select
          seq_id
      into
          l_seq_id
      from
          apex_collections
      where
          collection_name = k_rate_query
      and n001 = l_rate_type_code;
    
      apex_collection.update_member_attribute(k_rate_query, l_seq_id, 1, l_xml);
    
    exception
    
      when no_data_found
      then
        apex_collection.add_member(
            p_collection_name => k_rate_query
          , p_n001 => l_rate_type_code
          , p_xmltype001 => l_xml);
    
    end;
    

    2. use a SQL/XML query on the XML collection in the region report source:

    select
        rq.*
    from
        apex_collections ac
      , xmltable(
            '/RATE_REC/RATE_TBL/RATE_REC_TYPE'
            passing ac.xmltype001
            columns
                action_code         varchar2(20)  path 'ACTION_CODE'
              , rate_key            number        path 'RATE_KEY'
              , rate_type_code      varchar2(5)   path 'RATE_TYPE_CODE'
              , program_key         varchar2(12)  path 'PROGRAM_KEY'
              , rate                number(8,5)   path 'RATE'
              , effective_date      date          path 'EFFECTIVE_DATE'
              , current_yn          varchar2(1)   path 'CURRENT_YN'
              , non_current_dt      date          path 'NON_CURRENT_DT'
              , non_current_by_id   varchar2(4)   path 'NON_CURRENT_BY_ID'
              , non_current_reason  varchar2(400) path 'NON_CURRENT_REASON') rq
    where
        ac.collection_name = 'RATE_QUERY'
    and ac.n001 = to_number(:p1_rate_type_code)
    
  • How to create simultaneous program of type PL/SQL stored procedure?

    I have the procedure to reset sequence as below:

    CREATE OR REPLACE PROCEDURE DEV_RESET_XX IS

    V_NEXT_VAL1 NUMBER;

    BEGIN

    RUN IMMEDIATELY "ALTER SEQUENCE DEV_RECEIPT_S1 MINVALUE 0';"

    RUN IMMEDIATELY "SELECT DEV_RECEIPT_S1. DOUBLE NEXTVAL ' IN V_NEXT_VAL1;

    RUN IMMEDIATELY "ALTER SEQUENCE DEV_RECEIPT_S1 INCREMENT BY ' |" -V_NEXT_VAL1;

    RUN IMMEDIATELY "SELECT DEV_RECEIPT_S1. DOUBLE NEXTVAL ' IN V_NEXT_VAL1;

    RUN IMMEDIATELY "ALTER SEQUENCE INCREMENT DEV_RECEIPT_S1 1 ';"

    END DEV_RESET_XX;

    And if I run this query don't use PL/SQL, no problem and success.

    EXEC DEV_RESET_XX

    And then I want to create simultaneous program for this procedure.

    1. create the executable program

    -Methods: PL/SQL, stored procedure

    2. create the simultaneous program

    -Call the executable program

    -Nothing parameter

    3. assign the application group to receive

    And then I try to run this competitor.

    But, status complete error.

    8-31-2015 7-10-22 PM.jpg

    Help, please.

    Thank you.

    Hello

    To save pl sql program, we have two required parameters. ERRBUFF and RETCODE

    Steps to create a concurrent program of type PL/SQL stored procedure. Techmandate.com

    No need to create these parameters in the simultaneous program window. Just use those in your procedure.

    hope this will help you

  • Create a form based on a stored procedure error

    Hi all

    I am creating a form based on a stored procedure (CASH_MOVE). The stored procedure is inside a package (APEX_API).

    The package is not in the default schema of database application APEX (MO_APEX) analysis, but the workspace (USD) has access to this database scheme (MO_401)

    and the corresponding APEX analysis (MO_APEX/APEX_PUBLIC_USER) schema user has the EXECUTE privilege on the database to the other schema (APEX_API) package.

    So what happens during the wizard, at STEP 1, he sees the other schema, and I choose the package procedure.

    When I press next, it fails with the error 'user XXX has no privileges on the schema MO_401. ". "


    However, the user XXX is the developer of the APEX, which has no schema in the database. I tried also giving execute rights on APEX_PUBLIC_USER also without success.

    No idea why this happen?

    I use: Application Express 4.2.4.00.08

    Database version: 11.2.0.3.0

    TIA.

    Dionisis

    Ms. wrote:

    I am creating a form based on a stored procedure (CASH_MOVE). The stored procedure is inside a package (APEX_API).

    The package is not in the base schema of data analysis of the demand of the APEX (MO_APEX), but the workspace (MO_APEX) has access to this database scheme (MO_401)

    and the corresponding APEX analysis (MO_APEX/APEX_PUBLIC_USER) schema user has the EXECUTE privilege on the database to the other schema (APEX_API) package.

    So what happens during the wizard, at STEP 1, he sees the other schema, and I choose the package procedure.

    When I press next, it fails with the error 'user XXX has no privileges on the schema NNN. '.


    However, the user XXX is the developer of the APEX, which has no schema in the database. I tried also giving execute rights on APEX_PUBLIC_USER also without success.

    No idea why this happen?

    The developer APEX XXX there schema restrictions in the account privileges Schemes Accessible setting in Home > Administration > users > edit user?

  • Create a procedure stored via CMD

    How can I create stored via cmd procedure? A few reasons, I could not use SQL DEVELOPER or TOAD in the production server, so I create a sql file that contain SP then call sql via cmd file, but it does not work. Here is the sql file

    SET pages 0

    coil D:\SP\LOG\output_log.txt

    Create or Replace procedure TRUNCATE_DATA

    IS

    BEGIN

    RUN IMMEDIATELY 'TRUNCATE TABLE DONNEES_1;

    RUN IMMEDIATELY 'TRUNCATE TABLE DATA_2. "

    COMMIT;

    END;

    spool off

    output

    user11432758 wrote:

    How can I create stored via cmd procedure? A few reasons, I could not use SQL DEVELOPER or TOAD in the production server, so I create a sql file that contain SP then call sql via cmd file, but it does not work. Here is the sql file

    SET pages 0

    coil D:\SP\LOG\output_log.txt

    Create or Replace procedure TRUNCATE_DATA

    IS

    BEGIN

    RUN IMMEDIATELY 'TRUNCATE TABLE DONNEES_1;

    RUN IMMEDIATELY 'TRUNCATE TABLE DATA_2. "

    COMMIT;

    END;

    spool off

    output

    COMMIT after that DDL is superfluous.

    You must actually run the code as below by adding a slash on the END following line: statement

    [oracle@localhost ~] $ cat make_it.sql

    coil output_log.txt

    Create or Replace procedure TRUNCATE_DATA

    IS

    BEGIN

    RUN IMMEDIATELY 'TRUNCATE TABLE DONNEES_1;

    RUN IMMEDIATELY 'TRUNCATE TABLE DATA_2. "

    COMMIT;

    END;

    /

    spool off

    output

    [oracle@localhost ~] $ sqlplus User1/User1 @make_it.sql

    SQL * more: Release 11.2.0.2.0-Production on Mon Dec 16 19:56:41 2013

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    Created procedure.

    Disconnected from the database to Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    [oracle@localhost ~] $

  • Create or replace Stored procedure

    Hi all

    11.2.0.1

    I have the HR schema/user, who is the owner of all tables in the app.

    Then, all his paintings are also granted to BATCH - HR user with corresponding synonyms.

    This batch user will be used by computer operators to run reports of generations.

    For security reasons, they are not allowed to CONNECT to HR, but only to the BATCH - RH.

    My question is, can I create a stored procedure to the BATCH - RH which has only synonymous all tables?

    Or is it a good design to install it on human resources?

    Stored procedures recommend to operate only on base tables?

    Thank you

    Petra k.

    You can use everywhere in PL/SQL or external programs, because synonym is nothing more than a name new/more existing object; i.e. scott.emp table can have synonym1, synonym2, synonym3, etc.

    For more information: CREATE SYNONYM

    Concerning

    Girish Sharma

  • Create a stored procedure in the settings view

    I want to be able to create a view with the parameters of a stored procedure.

    Oracle 11g.

    don't know how to use the variable in immediate execution.

    CREATE OR REPLACE

    PROCEDURE TEST_GENERIC (TBL IN VARCHAR2, VWNAME IN VARCHAR2)

    AS

    BEGIN

    RUN IMMEDIATELY "CREATE OR REPLACE VIEW VWNAME AS SELECT SYSDATE FROM TBL";

    COMMIT;

    END;

    exec ('BIRD', 'DUAL') TEST_GENERIC

    Thanks for any help

    Hello

    Single quotes enclose a literal string; in other words, the text between the quotes literally means what it says, without reference to any variables.

    So, when you say:

    RUN IMMEDIATELY "CREATE OR REPLACE VIEW VWNAME AS SELECT SYSDATE FROM TBL";

    CREATE the word literally means to CREATE.  You may or may not have also a variable called CREATE, but that is irrelevant.

    The word OR means OR literally.  You may or may not have also a variable called operation GOLD, but that is irrelevant.

    REPLACE the word literally means REPLACE.  You may or may not have also a variable called to REPLACE, but that is irrelevant.

    ...

    The TBL Word literally means TBL.  You may or may not have also a variable called TBL, but that is irrelevant.

    If you want to reference a variable called TBL, then use TBL outside single quotes, like this:

    ...

    sql_text: = "CREATE or REPLACE VIEW VWNAME AS SELECT SYSDATE FROM '

    ||  TBL;

    dbms_output.put_line (sql_text |) "= sql_text before EXECUTE IMMEDIATE');   -For debugging

    EXECUTE IMMEDIATE sql_text.

    ...

    On the rare occasions when you use dynamic SQL statements, always put the dynamic SQL statement in a string variable (for example, sql_text, above) so that you can easily display for debugging purposes and to ensure that the command you are viewing is the same exact command that you should run.

    I guess the code you posted is a first test version of something that will be much, much different when it is finished.  Creating objects from database (such as views) in PL/SQL is almost always a terrible idea, and it seems that opinion that this code is attempting to produce would be very useful, anyway.

  • Link to database not be created using a stored procedure

    Hello

    I am creating a link of database using a stored procedure.

    Here is the code for it

    CREATE OR REPLACE PROCEDURE create_db_link (ca_db_name IN VARCHAR2,

    ca_service_name IN VARCHAR2)

    AUTHID CURRENT_USER IS

    BEGIN

    EXECUTE IMMEDIATE ' create public database link test_db_link connect to ca_db_name identified by ca_db_name using "ca_service_name" ';

    END create_db_link;

    During execution of the code is created the db_link. But, when I ask all_db_links I get the following result.

    OWNER

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

    DB_LINK

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

    USERNAME

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

    HOST

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

    CREATED

    ---------

    PUBLIC

    TEST_DB_LINK. WORLD

    CA_DB_NAME

    ca_service_name

    20 Aug 13

    Could you please help me understand why it shows the parameter names in the name column of the USER and the HOST instead of the name of the database and the name of the service?

    This is to show exactly what you said to do.

    Did you expect that Oracle would read as if by magic through your string you passed to run immediately and magically know to replace all occurrences of the string that correspond to local (or even global) parameter/variable names with the values of these variables?  It does not work like that.  You could concatenate the values into the string.

    for example

    EXECUTE IMMEDIATE ' create public database link test_db_link connect to ' | ca_db_name |' identified by ' | ca_db_name: ' using the "' | ca_service_name | " ' ;

    But why are create you database links running?  Shouldn't this be part of the design of your application and the initial fact before the application runs?

  • Failed to create the stored procedure with the object as a parameter

    Hello

    No idea how to create procedures to the current data stored in SQLFire, try to run the command prompt "sqlf" per call "create_proc.sql" as give below error below

    C:\SQLFire10Beta>sqlf
    sqlf version 10.4
    sqlf> connect client 'localhost:1527';
    sqlf> run 'create_proc.sql';
    sqlf> CREATE PROCEDURE INSURANCE.SEARCHCUSTOMER (IN CUST OBJECT) DYNAMIC RESULT SETS 1 LANGUAGE JAVA PARAMETER STYLE JAVA READS SQ
    L DATA EXTERNAL NAME com.xxx.xxx.sqlfire.dao.CustomerSearchProcedure.searchCustomer;
    ERROR 42X01: Syntax error: Encountered "" at line 1, column 47.
    Caused by: SqlException: Syntax error: Encountered "" at line 1, column 47.
            at com.vmware.sqlfire.internal.client.am.Statement.completeSqlca(Statement.java:1838)
    sqlf> sqlf> 


    and I created a class Java as described below:

    public class CustomerSearchProcedure {
     
     public static void searchCustomer (BaseDTO[] customers, ResultSet[] outResults,
       ProcedureExecutionContext context) throws SQLException {
      BaseDTO searchCriteria = customers[0];
      StringBuilder sql = new StringBuilder();
      sql.append("SELECT * FROM INSURANCE.CUSTOMERS WHERE CUST_NAME LIKE '"+searchCriteria.getCustName().trim() + "%'");
      
      Connection cxn = context.getConnection();
      Statement stmt = cxn.createStatement();
      ResultSet rs = stmt.executeQuery(sql.toString());
      outResults[0] = rs;
     } //END OF METHOD
    }


    This procedure is called class using the class StoredProcedure Spring DAO

    You can let me know why am not able to create the procedure?

    FYI, pots can also can be dynamically installed in the system by using the SYS. Table client-side JARS to transport the jar bytes rather than by requiring that the pot be accessible side Server (http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.sqlfire.1.0/deploy_guide/Topics/sysjars_install.html)

  • Use the stored procedure to create the data model for the bi publisher report

    Hi all

    Can we use stored procedure to create the data model for BI Publisher reports? I did find an example by using the stored procedure to complete the data model in the bi publisher report.

    Thank you

    Virat

    Check out these links

    BI publisher to use the stored procedure
    Re: Stored procedures and dynamic columns
    Re: Is it possible to use stored procedures in BI Publisher GUI?
    Re: PL/SQL stored w / model XML?

    If brand pls help

  • How to create a stored procedure to delete and create table

    Version: Oracle 10g

    I am trying to create a stored procedure that is delete it and create a table based on a select statement. I can create the table, but I can't let it go.

    CREATE or REPLACE procedure EC_LOAD is
    Start
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    Of
    sales_revenue;
    end ecload;

    I need to drop the Sales_table before inserting the values. How can I do this?

    user610131 wrote:

    I need to drop the Sales_table before inserting the values. How can I do this?

    If you drop off where you insert it :)? Do you mean DELETE or TRUNCATE?

    If table can be truncated (and don't forget TRUNCATE is DDL then he will commit):

    CREATE OR REPLACE procedure EC_LOAD is
    begin
    EXECUTE IMMEDIATE 'TRUNCATE TABLE Sales_table';
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    from
    sales_revenue;
    end ecload;
    

    Otherwise, use DELETE:

    CREATE OR REPLACE procedure EC_LOAD is
    begin
    DELETE Sales_table;
    INSERT INTO Sales_table
    (FSCL_WK,
    DIV,
    ACCT_TYPE)
    Select
    FSCL_WK,
    DIV,
    ACCT_TYPE
    from
    sales_revenue;
    end ecload;
    

    SY.

  • How to create temporary tables in stored procedures.

    Hello

    I am new to oracle, I have a requirement where I need to run a query in a loop for different values of where condition. Here, I need to record the results of the query on each iteration. After the end of the loop, I need to send the results to the front end. I did a lot of research for the concept of the temporary table in oracle, but I found myself unresolved except headaches. Everyone is showing how to create temporary tables in general but not in stored procedure.

    Bad, I need the concept of temporary tables, or is there an alternative way to store temporary results. My procedure looks like this.

    create or replace
    procedure uspMatchCode (parWord varchar2, p_recorderSet to types.cursor_type)
    as
    smallint parCnt;
    Start
    parcnt: = 0;
    Select count (1) in parCnt of...;
    If parcnt > 0 then
    Open for P_recorderSet
    Select field1, field2, field3,... of table1, table2, table2 where < < condition > >
    on the other
    -Here, I want to create a temporary table and store the result for the loop shape into the temporary table.
    CREATE TEMPORARY TABLE global my_temp_table (NUMBER of Column1, Column2) ON COMMIT DELETE ROWS.
    FOR parCnt in 0.3
    loop
    INSERT into my_temp_table select Field1, Field2, field3,... from table1, table2, table2 where < < condition > >
    end loop;
    Open for P_recorderSet
    Select * from < < temporary table > >
    end if;
    end;

    Any help would be great to check me on the problem.

    Thank you
    Kiran.

    This is a change to the query Kiss has posted:

    with data_text like)
    Select regexp_substr (' sales financing marketing ',' [^] +', 1, level ") val
    of tconnect by level<= length('sales="" finance="" marketing')-="" length(replace('sales="" finance="" marketing','="">
    )
    Select * from t, data_text, where t.colname like '% "| data_text. Val |' %'

    This will help you. Please change the column names and the name of the table as a result

Maybe you are looking for