Temp tables using an interfaces in ci

what is the purpose of temp tables in ci while performing interfaces
any one explain me processing

Processing a CI messes up SQL cursors I recently discovered. A temp table or a rowset to retrieve the values you're looping over (if applicable of course) can help resolve this issue.
If you mean App Engine processing in general (as in post above), it mostly is to avoid looping per row and doing the same action over and over again, or to avoid having to put a lot of large tables into 1 query (you could update some of the fields in different steps), for instance support I want to update an amount for each person, then I could have a
In most cases less performant version:
DoSelect:
%Select(EMPLID)
SELECT EMPLID FROM your query
Followed by:
INSERT INTO My_Result
SELECT * FROM My_Table
Where emplid = %Bind(Emplid)
In most case better:
SQL step:
Insert into %Table(My_ExmplTMP) (EMPLID) SELECT EMPLID FROM your query
Followed by:
INSERT INTO My_Result
SELECT * FROM My_Table Tbl, %Table(My_ExmplTMP) Tmp
Where Tbl.emplid = TMP.Emplid

Similar Messages

  • Create temp table using EXECUTE IMMEDIATE

    Is there any performance issue in creating globally temp table
    using EXECUTE IMMEDIATE or creating globally temp table from
    SQL PLUS.
    Any response will be greatly appreciated.
    null

    Anish,
    Creating tables is likely to be an expensive operation.
    Performance issues can only be considered in comparison to
    alternatives.
    Alternatives include: PLSQL tables, cursors and/or recoding so
    that tmp tables are not required. (One of our consultants reckons
    that sqlserver temp tables are usually used to get around
    limitations in sqlserver, ie slightly more complicated sql
    statements could be used instead of simpler sql and temporary
    tables).
    I would think creating the temp table once during sqlplus would
    be cheaper than creating and deleting it repeatedly at run time.
    Note that EXECUTE IMMEDIATE may do an implicit commit (dbms_sql
    certainly does). This may be got over my using the PRAGMA
    AUTONOMOUS_TRANSACTION; direction which places a
    procedure/function in a seperate transaction.
    Turloch
    P.S. We have some difficulty in getting information back from the
    field/customer sites. If you have questions and answers that are
    likely to be useful to other Oracle Migration Workbench
    users, and migrators in general, please send them in for possible
    inclusion in our Frequently Asked Question list.
    Oracle Migration Workbench Team
    Anish (guest) wrote:
    : Is there any performance issue in creating globally temp table
    : using EXECUTE IMMEDIATE or creating globally temp table from
    : SQL PLUS.
    : Any response will be greatly appreciated.
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Physical attributes for index on temp tables (using physical model)

    I need create index on temp tables.
    When I generate DDL, it includes physical attributes like ‘LOGGING NOCOMPRESS NOPARALLEL’.
    I get error "ORA – 14451 (unsupported feature w/temporary tables)"
    I’ve to use physical model in OSDM. How do I get rid of physical attributes in DDL for index?

    Hi,
    Thanks for reporting this problem.
    You can remove the LOGGING clause by opening the Properties dialog for the Index in the Physical model and setting its Logging property to the blank option.
    However it's not possible to suppress the NOCOMPRESS and NOPARALLEL at the moment.
    I've logged a bug on this.
    As a workaround, you could do a global edit on the DDL file to remove all instances of NOCOMPRESS and NOPARALLEL.
    David

  • Populating the Addressee field using Customer Interface program

    Hello All,
    Can any body tell me how to populate the "Addressee" column in the HZ_Party_Sites table using Customer Interface Program. Which field should be populated in RA_Customers_Interface_All table inorder to populate the "Addressee" field.
    Thank you,
    Vijay

    You can post this thread in this
    Customers as well.
    Thanks
    GM

  • MySQL temp tables or Calling Stored procedures in CS4

    I need to filter a result set by username before performing a LEFT JOIN and including OR IS NULL rows. The SQL works from from the mysqli client, by either creating a temp table using  "create temporary table temp_appts select * from..."  Or by creating a stored procedure which contains the same "create temp table" statement, then running my LEFT JOIN statement against the temp table.
    I have tried both in CS4, it accepts the code in "code view" without errors but the page in a browser loads as a blank or a 500 error in IE. In my experience, this is caused by exiting before reaching the html header.
    Is it possible to do either in CS4?  Below is the code I am using.
    $varU_temp_appts = "-1";
    if (isset(<?php $_SESSION['MM_Username'])){
    $varU_temp_appts =$_SESSION['MM_Username'];
    mysql_select_db($database_ess, $ess);
    $query_temp_appts = sprintf("CREATE TEMPORARY TABLE temp_appts SELECT * FROM appts WHERE username=%s", /GetSQLValueString($varU_temp_appts, "text"));
    $temp_appts = mysql_query($query_temp_appts, $ess) or die(mysql_error());
    $row_temp_appts = mysql_fetch_assoc($temp_appts);
    $totalRows_temp_appts = mysql_num_rows($temp_appts);
    mysql_select_db($database_ess, $ess);
    $query_todays_appts = "SELECT *  FROM appt_tm LEFT JOIN (temp_appts) ON appt_tm.appt_time=temp_appts.appt_hr WHERE(appt_date=CURDATE() OR appt_date IS NULL)";
    $todays_appts = mysql_query($query_todays_appts, $ess) or die(mysql_error());
    $row_todays_appts = mysql_fetch_assoc($todays_appts);
    $totalRows_todays_appts = mysql_num_rows($todays_appts);
    Any help is appreciated!

    chuck8 wrote:
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'appt_tm LEFT JOIN (temp_appts) ON appt_tm.appt_time=temp_appts.appt_hr where tem' at line 1
    I'm no expert on joins, but I know there were changes in MySQL 5.0.12 that resulted in queries that had previously worked failing. Go to http://dev.mysql.com/doc/refman/5.0/en/join.html, and scroll down to the section labelled Join Processing Changes in MySQL 5.0.12.

  • How to use temporary interface in another interface as derived table in 10g

    Hi ,
    Can somebody please tell me how to use temporary interface in another interface as derived table in 10g.
    I have an option in odi 11g to this task.But i am working on odi 10g for my project.So that please help me to do this task.
    I can able to create temporary interface in 10g ,but i dont know how to use that temporary interface in another inerface as derived table.
    Thanks in Advance
    Thanks,
    Srikanth A

    A temp interface CANNOT be used as a derived table in ODI 10g.
    All you can do is to drag and drop the temp interface as the source in the mapping.
    PS. Please remember to assign correct/helpful points to the people who help you in the forum.

  • Can i use one interface to load data into 2 different tables

    Hi Folks,
    Can i use one interface to load data into 2 different tables(same schema or different schemas) from one source table with same structure ?
    Please give me advice
    Thanks
    Raj
    Edited by: user11410176 on Oct 21, 2009 9:55 AM

    Hi Lucky,
    Thanks for your reply,
    What iam trying is ...Iam trying to load the data from legacy tables(3) into oracle staging tables.But i need to load the same source data into two staging tables(these staging tables are in two different schemas)
    can i load this source data into two staging tables by using single standard interface(some business logic is there)
    If i can then give me some suggestion how to do that
    Thanks in advance
    Raj

  • Can a tabular form be created/used against a GLOBAL TEMP TABLE?

    We are trying to simplify our apex applications. In doing so, we are examing the many collections we use to create tablular forms. These collections currently are tricky to manage and we are considering moving them to either VIEWS or GLOBAL TEMPORARY TABLES (GTT).
    I have created a test app against a GLOBAL TEMP TABLE....it looks great, but when I add a row and SUBMIT I recieve a message indicating record is inserted....but where did it go? I am unable to retrieve...I cannot see it in the underlying GLOBAL TEMP TABLE (as expected)....
    should I be creating an ON INSERT table on the GTT to automatically insert the data into a regular table?

    Now you know why you have to use collections :) Answered here:
    working with global temp table and apex
    Has to do with the session management and how APEX handles it.
    Create a view on your collection using the column names from the source table. Use packages to write an update, delete and insert process. This can be written automatically if there are multiple collections to handle.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Want to use the same #TEMP table for multiple datasets in SSRS 2005

    I am using Visual Studio 2005 to create SSRS 2005 reports. The report will consist of two different matrix from two different dataset that will gather data from the same data source. The first dataset is a procedure that inserts data from a query into
    a #temp table and outputs it in the first matrix. I want the second dataset to be a different procedure that references the same #temp table. When the report is pulled then can the #temp table be dropped.

    Try in the Dataset properties.  In the Query tab, under and to the right of "Data source:" click the box with the elipses (...).  In the General tab, toward the bottom, there is a check box beside "Use single transaction".
    Rakesh M J | MCTS,MCITP ( SQL SERVER 2008 )
    Dont forget to mark it as Answered if found useful |
    myspeakonbi

  • Issue in Temp table creation in PCM Databridge and data migration from ecc to PCM using databridge

    Hi,
    we are working on mapping SAP PCM table structure data and the data which is coming from ECC.
    We are using Databridge tool to upload the data for the same,upload from databridge involves
    using Specification file to upload the data into SAP PCM.
    The problem we are facing is that
    The responsiblity center(cost center) in ECC and SAP PCm are different.There is one to many relationship between them
    eg 1 ecc cost center-->many SAP PCM cst center,we need to split the line item vale of one ecc cost center into many SAP PCM cost centers
    eg C1 cost center from ECC has value 4000 to be split across PCM1,PCM2,PCM3,PCM4 cost centers in SAP PCM
    we need to automate using the databridge ,we are stuck up in this task.
    Please guide us.
    Also we are trying to create temporary table usinf Table temporary command in SPE file of databridge.The purpose of this is to put the ECC data in temp table as per our req and then use the temp table as data source for putting data in PCm as per our requirement.
    Please advise us on this approach
    Regards
    Shrirang
    9552334897

    Schema's SYS,CTXSYS, MDSYS and ORDSYS are Not Exported using exp/expdp
    Doc ID: Note:228482.1
    I suppose he already installed a software 12c and created a database itseems - So when you imported you might have this "already exists"
    Whenever the database is created and software installed by default system,sys,sysaux will be created.

  • Can't i use temp tables in regions?

    Hi,
    I'm trying to population 3 years fiscal year data in a single row, one for full time and other one for part time employees. So my output should look like this
    Population Fy1_Tot Fy1% Fy2_Tot Fy1% Fy3_Tot Fy3%
    FT 500 50.0 700 70.0 9000 90.0
    PT 500 50.0 300 30.0 1000 10.0
    Each fy1 data represents different month, based on the month I have to populate corresponding Fiscal year and I have take care this.
    I could do this using TEMP table and works well in Toad but not in HTML DB? Can’t I use temp tables in regions?
    Please see the query below
    WITH TEMP AS(
    SELECT INITCAP(FIELD_VALUE) as Population,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY1 THEN TO_NUMBER(FYT3) END) as Total1,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY1 THEN FYP3 END) as FY1P,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY2 THEN TO_NUMBER(FYT2) END) as Total2,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY2 THEN FYP2 END) as FY2P,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY3 THEN TO_NUMBER(FYT1) END) as Total3,
    (CASE WHEN D_S_REP.SMC = :P14_MC_FY3 THEN FYP1 END) as FY3P
    FROM D_S_REP
    WHERE FIELD_NAME='POPULATION'
    AND RS_YR LIKE '%'||TRIM(:P14_S_YR) || '%'
    AND D_S_REP.SMC IN (TRIM(:P14_MC_FY1),TRIM(:P14_MC_FY2),TRIM(:P14_MC_FY3))
    AND WP_NAME = TRIM(:P14_WP_NAME)
    AND RDL_NAME LIKE '%'||TRIM(:P14_EMPLOYEES)||'%'
    GROUP BY FIELD_VALUE,D_S_REP.SMC, FYT3,FYP3,FYT2,FYP2,
    FYT1,FYP1)
    SELECT Population, SUM(Total1), SUM(FY1P), SUM(Total2), SUM(FY2P),SUM(Total3), SUM(FY3P) FROM TEMP
    GROUP BY Population
    Any thoughts!!
    Thanks
    CK

    Actually the same query works well, in HTML DB too. it was my fault i placed the query in a wrong region so i was getting error..
    Thanks

  • Best options to use in Temp Table

    Hello,
    I was just trying to figure out the best options we can choose with when we come across a scenario where we need to use a  Temp Table/Table Variable/Create
    a Temp Table on the fly.
    However, I could not see any big difference in using those options. As per my understanding using a table variable is more convenient if the query logic is
    small and the result set also will be comparatively small.Creating a temp table is also an easy option but it takes much time and we can not create any indexes on it. I am working on a query optimization task where in plenty of temp tables are used
    and the query takes more than five minutes to execute. We have created few indexes and all in few tables and reduced the query execution time up to 2 mnts.Can anyone give me more suggestions on it. I have gone through various articles about it and came to
    know that there is no one solution for this and I am aware of the basic criteria like  use Set No count on, Order the table in which the indexes are created, Do not use Select * instead use only columns which are really required, Create Indexes
    and all. Other than these I am stuck with the usage of temp tables. There are some limitations where I can convert all the Temp table logic to CTE (I am not saying its not possible, I really dont have time to spend for the conversion). Any suggestions are
    welcome.
    Actual Query
    select Code,dbo.GetTranslatedText(Name,'en-US')
    as Name from ProductionResponse.ProductionResponse
    00.00.02
    5225 rows
    With Table Variable
    DECLARE  @General
    TABLE(Code
    NVarchar(Max),Name
    NVarchar(Max)
    INSERT
    INTO @General
    select Code,dbo.GetTranslatedText(Name,'en-US')
    AS Name  from ProductionResponse.ProductionResponse
    select
    * from @General
    00.00.03
    5225 rows
    With an Identity Column
    DECLARE  @General
    TABLE(Id
    INT IDENTITY(1,1)
    ,Code NVarchar(Max),Name
    NVarchar(Max)
    INSERT
    INTO @General
    select Code,dbo.GetTranslatedText(Name,'en-US')
    AS Number  from ProductionResponse.ProductionResponse
    select
    * from @General
    00.00.04
    5225 rows
    With Temp Table:
    CREATE
    TABLE #General (Id
    INT IDENTITY(1,1)
    PRIMARY KEY,Code
    NVarchar(Max),Name
    NVarchar(Max)
    INSERT
    INTO #General
    select Code,dbo.GetTranslatedText(Name,'en-US')
    as Name from ProductionResponse.ProductionResponse
    select
    * from #General
    DROP
    TABLE #General
    00.00.04
    5225 rows
    With Temp Table on the Fly
    SELECT G.Code,G.Name
    INTO #General  
    FROM
    select Code,dbo.GetTranslatedText(Name,'en-US')
    as Name from ProductionResponse.ProductionResponse
    )G
    select
    * from #General
    00.00.04
    5225 rows

    >> I was just trying to figure out the best options we can choose with when we come across a scenario where we need to use a Temp Table/Table Variable/Create a Temp Table on the fly. <<
    Actually, we want to avoid all of those things in a declarative/functional language. The goal is to write the solution in a single statement. What you are doing is mimicking a scratch tape in a 1950's tape file system. 
    Another non-declarative technique is to use UDFs, to mimic 1950's procedural code or OO style methods. Your sample code is full of COBOL-isms! In RDBMS we follow ISO-11179 rules, so we have “<something in particular>_code” rather than just “code” like
    a field within a COBOL record. The hierarchical record structure provides context, but in RDBMS, data elements are global.  Or better, they are universal names. 
    >> I am aware of the basic criteria like use SET NO COUNT ON, Order the table in which the indexes are created, Do not use SELECT * instead use only columns which are really required, CREATE INDEXes and all.<<
    All good, but you missed others. Never use the same name for a data element (scalars) and a table (sets). Think about what things like “ProductionResponse.production_response” means. A set with one element is a bit weird, but that is what you said. Also, what
    is this response? A code? A count? It lacks what we call an attribute property. 
    This was one of the flaws we inherited when ANSI standardized SQL and we should have fixed it. Oh well, too late now. 
    Never use NVARCHAR(MAX). Why do you need to put all of the Soto Zen sutras in Chinese Unicode? When you use over-sized data elements, you eventually get garbage data. 
    >> Other than these I am stuck with the usage of temp tables. There are some limitations where I can convert all the Temp table logic to CTE (I am not saying its not possible, I really do not have time to spend for the conversion). Any suggestions are
    welcome.<<
    Yes! This is how we do declarative/functional programming! Make the effort, so the optimizer can work, so you can use parallelism and so you can port your code out of T-SQL dialect. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Use global temp table for DML error logging

    our database is 11.2.0.4 enterprise edition on solaris 10
    we are wondering if anyone has an opinion of or has done this before, to use a global temp table for DML error logging. We have a fairly busy transactional database with 2 hot tables for inserts. The regular error table created with dbms_errlog has caused many deadlocks which we don't quite understand yet. we have thought using global temp table for the purpose, and that seemed to work, but we can't read error from the GTT, the table is empty even reading from the same session as inserts. Does anyone have an idea why?
    Thanks

    The insert into the error logging table is done with a recursive transaction therefore it's private from your session which is doing the actual insert.
    Adapted from http://oracle-base.com/articles/10g/dml-error-logging-10gr2.php
    INSERT INTO dest
    SELECT *
    FROM  source
    LOG ERRORS INTO err$_dest ('INSERT') REJECT LIMIT UNLIMITED;
    99,998 rows inserted.
    select count(*) from dest;
      COUNT(*)
        99998
    SELECT *
    FROM  err$_dest
    WHERE  ora_err_tag$ = 'INSERT';
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    1000        Description for 1000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    10000        Description for 10000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    1000        Description for 1000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    10000        Description for 10000
    rollback;
    select count(*) from dest;
      COUNT(*)
            0
    SELECT *
    FROM  err$_dest
    WHERE  ora_err_tag$ = 'INSERT';
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    1000        Description for 1000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    10000        Description for 10000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    1000        Description for 1000
    1400    "ORA-01400: cannot insert NULL into ("E668983_DBA"."DEST"."CODE")"        I    INSERT    10000        Description for 10000

  • How to use "Auto increment" in temp table Oracle

    Pleas tell me yaar,
    In MS Sql for Auto increment i am using like this "seqid int identity" for temp table
    t_seq_tbl table(seqid int identity,EVENT_SEQ_NO varchar(30))
    In oracle how to use....

    As far as I know there is not any auto increment data type in Oracle. Instead of this you should create a sequence and get the next value of the sequence while creating a row in your table.
    CREATE SEQUENCE Test_Sequence ;
    CREATE TABLE Test_Table ( Id NUMBER , Foo VARCHAR2(4) ) ;
    ALTER TABLE Test_Table ADD CONSTRAINT Test_Table_PK_Id PRIMARY KEY ( Id ) ;
    INSERT INTO Test_Table ( Id , Information ) VALUES ( Test_Sequence.NEXTVAL , 'FOO' ) ;

  • Stored procedure with temp table creation inside and using it

    I want to create a temp table inside a stred procedure and make use of it . I want perform some delete statements based on select statemets .An I want to drop the table at the end .
    When I tried to create a table inside the stored procedure using exxecute immediate statement ,.
    sql_stmt := 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure';
         EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from woc_pattern_structure' ;
    Then my select statements that contain this table do not identify the table name.
    I got compilor error when I use it in hte stored procedure in the select statement .Then I did like this-
    WHENEVER SQLERROR CONTINUE
    DROP TABLE pattern_str_temp;
    CREATE TABLE pattern_str_temp AS SELECT * FROM pattern_structure ;
    COMMIT;
    CREATE OR REPLACE PACKAGE BODY Woc_Delete_Model_Data
    AS
    NAME: Woc_Delete_Model_Data
    PURPOSE:
    REVISIONS:
    Ver Date Author Description
    1.0 11/01/2008 gtutika 1. Deletes given Product Model
    PROCEDURE deleteCategory(p_product_model IN varchar2,
                   p_request_status OUT VARCHAR2,
                   p_err_mesg OUT VARCHAR2
    IS
    l_category VARCHAR2(200);
    l_count NUMBER;
    CURSOR getAttribute IS
         SELECT Category_Name
         FROM
    Woc_Attribute_Category
    WHERE Attribute_Name in
    (SELECT Child_Name FROM pattern_structure
    WHERE Child_Type = 'Attribute' and product_Model_Name = p_product_model)
    FOR UPDATE;
    BEGIN
         DBMS_OUTPUT.ENABLE(1000000);
         --dbms_output.put_line('START-Inside DeleteCategory Procedure .........');
         --sql_stmt := 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure';
         --EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE pattern_str_temp as select * from pattern_structure' ;
         OPEN getAttribute ;
    LOOP
         FETCH getAttribute INTO l_category ;
         EXIT WHEN getAttribute%NOTFOUND;
         l_count := Is_Category_Used(p_product_model , l_category);
    IF (l_count=0) THEN
         DELETE FROM WOC_ATTRIBUTE_CATEGORY where CATEGORY_NAME = l_category;
         DELETE from woc_item_category
         where CATEGORY_NAME = l_category;
         DELETE FROM WOC_CATEGORY WHERE CATEGORY_NAME = l_category;
    END IF;
         END LOOP;
         --(getAttribute%ROWCOUNT);
         CLOSE getAttribute;
         --dbms_output.put_line('END-Inside DeleteCategory Procedure .........');
    EXCEPTION
         WHEN OTHERS THEN
         dbms_output.put_line(SQLERRM);
              p_err_mesg := 'ERROR IN CUSOR';
              --dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    FUNCTION Is_Category_Used(p_product_model IN varchar2 , p_category IN Varchar2)
         RETURN NUMBER IS
         l_count NUMBER;
         l_attribute VARCHAR2(40);
         l_pattern varchar2(30);
         CURSOR getAttribute IS
         SELECT attribute_Name from
         WOC_ATTRIBUTE_CATEGORY WHERE category_name = p_category and Attribute_Name in
         (Select Child_Name from pattern_str_temp
         where child_type = 'Attribute' and product_Model_Name = p_product_model);
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
         SELECT count(*) into l_count from
         WOC_ATTRIBUTE_CATEGORY WHERE category_name = p_category and Attribute_Name in
         (Select Child_Name from pattern_str_temp
    where child_type = 'Attribute' and product_Model_Name <> p_product_model);
         OPEN getAttribute;
    LOOP
         FETCH getAttribute INTO l_attribute;
         EXIT WHEN getAttribute%NOTFOUND;
         DELETE FROM pattern_str_temp WHERE Product_Model_Name=p_product_model
         and child_type = 'Attribute' and child_Name= l_attribute;
         END LOOP;
         CLOSE getAttribute;
         RETURN l_count;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(SQLERRM);
              --dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    PROCEDURE delete_batch_woc_model(p_product_model IN VARCHAR2,p_flag IN VARCHAR2,
    p_err_mesg OUT VARCHAR2)
         IS
         p_request_status VARCHAR2(30);
    BEGIN
         deleteCategory(p_product_model,p_request_status ,p_err_mesg );
    EXCEPTION WHEN OTHERS THEN
         dbms_output.put_line(SQLERRM);
              p_err_mesg := 'ERROR IN CUSOR';
              dbms_output.put_line('ERROR in CUSOR');
              ROLLBACK;
    END;
    END Woc_Delete_Model_Data;
    --drop table pattern_str_temp ;
    SHOW ERRORS;
    But once the data is deleted , the data in the temp table is deleted when I load the data and try to delete it agian since I have no data in temp table ,the data is not deleted .So I need to create the temp table every time the stored procedure is called ,delete accordingly and drop the table at the end .
    Please suggest how to do it.
    Thanks.

    I'm not sure I understand what you're attempting to do...
    What is the benefit of a temporary table that stores the same set of data that is in the master table? Why not just
    DELETE FROM child_table1
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM child_table2
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM child_table30
    WHERE foreign_key IN (
        SELECT primary_key
          FROM master_table
         WHERE some_condition);
    DELETE FROM master_table
    WHERE some_condition;or
    FOR x IN (SELECT * FROM master_table WHERE some_condition)
    LOOP
      DELETE FROM child_table1 WHERE foreign_key = x.primary_key;
      DELETE FROM child_table2 WHERE foreign_key = x.primary_key;
      DELETE FROM child_table30 WHERE foreign_key = x.primary_key;
      DELETE FROM master_table WHERE primary_key = x.primary_key;
    END LOOP;Justin

Maybe you are looking for

  • Does the Iphone 5 log when it is shut down?

    I forgot to hand it in during an exam. Can I somehow proof that it has in fact been shut down during the time of the exam? It was confiscated and is still in their costidy. It would be awsome, if I could somehow show that it has been shut down during

  • Print preview screen always appears in IW38 while printing order.

    Hi Experts, I have a user who always gets a print preview screen while printing orders from orders list page in IW38 T-Code. Now we have tried to set his printer as default in SU3 T-Code, Also we have  selected the Print Immediately Option, In additi

  • IPhoto reports "100 page limit reached" but I'm only on page 87

    I understand, for whatever reason, there is a limite of 100 pages in iPhoto's Book feature. Fine, I combed through my photos and reduced, reduced, reduced. I've spent a lot of time on it. However, now I'm creating pages manually, one at a time, and I

  • Dotted navigation using Adobe Flex 3 or 4

    Hi, I have a requirement of showing pie chart with different data using 'dotted navigation' Attached is the screenshot of which I need to implement similarly using Flex If use clicks left or right arrows, I need to show pie chart with different data

  • Dreamweaver CC 13.2.1 update is now live

    Dreamweaver UI will now be scaled on displays with more than 100% DPI.