Procedure to delete mutiple table records with 1000 rows at a time

Hello Champs,
I am having requirement to create procedure to achive the deletes from 5 big tables. 1 master table and 4 child tables. Each table has 28 millions records. Now I have to schedule a procedure to run it on daily basis to delete approximately 500k records from each tables. But the condition is: Seperate procedures for each tables and delete only 1000 rows at a time. The plan is below. Since I am new for writing complicate procedure, I don't have much idea how to code the procedures, can some one help me to design the procedure queries. Many Thanks
1. Fetch 1000 rows from master table with where clause condition.
2. Match them with each child tables and delete the records.
3. Atlast delete those 1000 rows from master table.
4. over all commit for all 5 X 1000 records.
5. Repeat the steps 1 to 4 till no rows to fetch from master table.
Below are detailed procedure plan:----
----- Main procedure to fetch 1000 rows at a time and providing them as input to 5 different procedures to delete records, repeating same steps till no rows to fetch i.e. (i=0)-----
Create procedure fetch_record_from_master_table:
loop
i = Select column1 from mastertable where <somecondition> and rowcount <= 1000;
call procedure 1 and i rows as input;
call procedure 2 and i rows as input;
call procedure 3 and i rows as input;
call procedure 4 and i rows as input;
call procedure 5 and i rows as input;
commit;
exit when i=0
end loop;
----- Sepereate procedure's to delete records from each child tables------
Create procedure 1 with input:
delete from child_table1 where column1=input rows of master table;
Create procedure 2 with input:
delete from child_table2 where column1=input rows of master table;
Create procedure 3 with input:
delete from child_table3 where column1=input rows of master table;
Create procedure 4 with input:
delete from child_table4 where column1=input rows of master table;
--- procedure to delete records from master table atlast----
Create procedure 5 with input:
delete from Master_table where column1=input rows of master table;

Oops, but this will work, won't it?
begin
  execute immediate 'truncate table child_table1';
  execute immediate '  truncate table child_table2';
  execute immediate '  truncate table child_table3';
  execute immediate '  truncate table child_table4';
  for r_fk in ( select table_name, constraint_name
                from user_constraints
                where table_name = 'MASTER_TABLE'
                and   constraint_type = 'R'
  loop
    execute immediate 'ALTER TABLE ' || r_fk.table_name || ' MODIFY CONSTRAINT ' || r_fk.constraint_name || ' DISABLE';
  end loop;
  execute immediate '  truncate table master_table';
  for r_fk in ( select table_name, constraint_name
                from user_constraints
                where table_name = 'MASTER_TABLE'
                and   constraint_type = 'R'
  loop
    execute immediate 'ALTER TABLE ' || r_fk.table_name || ' MODIFY CONSTRAINT ' || r_fk.constraint_name || ' ENABLE';
  end loop;
end;
/ Or
  truncate table child_table1;
  truncate table child_table2;
  truncate table child_table3;
  truncate table child_table4;
begin
  for r_fk in ( select table_name, constraint_name
                from user_constraints
                where table_name = 'MASTER_TABLE'
                and   constraint_type = 'R'
  loop
    execute immediate 'ALTER TABLE ' || r_fk.table_name || ' MODIFY CONSTRAINT ' || r_fk.constraint_name || ' DISABLE';
  end loop;
end;
truncate table master_table;
begin
  for r_fk in ( select table_name, constraint_name
                from user_constraints
                where table_name = 'MASTER_TABLE'
                and   constraint_type = 'R'
  loop
    execute immediate 'ALTER TABLE ' || r_fk.table_name || ' MODIFY CONSTRAINT ' || r_fk.constraint_name || ' ENABLE';
  end loop;
end;
/

Similar Messages

  • Delete a table record with eCATT-Script and parameter - PROBLEM

    I will write a eCATT, witch can delete one record in the table. In this case
    it will be a material. The material to delete will be my input parameter.
    You can see on the picture how the structure of the ecatt after recording is.
    <a href="http://www.carsdream.com/ecatt.jpg">Structure of the ecatt after recording....</a>
    I have the following problem:
    For example i will delete the "Material 6". I give as parameter the name of
    this material. ( I don't know the ID.)
    How can i automaticly find the index of the table RECENT, where the naterial
    "Material 6" to find is ?
    Important is, that by the test executing i don't know how many index the
    table RECET have and i don't know under which index "the Material 6" can be
    found.
    If i find the index of this table, my problem will be solved.
    If you can answer that, it will be for me very helpful!

    Helle,
    thanks for your answer.
    I coudn't find the place where i could read this note, but i have book about testig SAP-Solutions and you can find there that:
    "With the basis release of Web AS 6.40, eCATT supports the direct testing of Web Dynpro-based applications. Both Web Dynpro for ABAP and for Java are supported."
    Look the link to SAP-PRESS:
    http://www.sap-press.de/katalog/buecher/htmlleseproben/gp/htmlprobID-58
    So what's the fact ? It's supported or not?
    My application work under Web Dynpro Java, but i think, that the solution of my problem should be similar to the solution for Web Dynpro ABAP, that way i ask the question on this forum.
    I someone knows the solution of my problem, it will be very helpfull for me.
    Thanks

  • Select statement from a join file deletes the primary records with MS Expl.

    Hello,
    is reality,
    Select statement from a join file deletes the primary records with MS Explorer 6, Firefox not, this with a normal data provider or with a normal "select..." statement.
    This is very strange, I should have a.a.s.p. a solution or workaround
    Thanks, Franco.
    Message was edited by:
    fbiaggi

    Please see the following excerpt from the online documentation.
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_modes.htm#SUTIL1332
    Enabled Constraints
    During a direct path load, the constraints that remain enabled are as follows:
    NOT NULL
    UNIQUE
    PRIMARY KEY (unique-constraints on not-null columns)
    NOT NULL constraints are checked at column array build time. Any row that violates the NOT NULL constraint is rejected.
    Even though UNIQUE constraints remain enabled during direct path loads, any rows that violate those constraints are loaded anyway (this is different than in conventional path in which such rows would be rejected). When indexes are rebuilt at the end of the direct path load, UNIQUE constraints are verified and if a violation is detected, then the index will be left in an Index Unusable state. See "Indexes Left in an Unusable State".

  • Procedure to update the table records

    I have to write a procedure to update the existing records.
    I have one staging table and one decode table.
    staging table is obtained from a interface with cross join of two tables X1 and X2 and
    lookup with DECODE table.
    DECODE
    ITEM_ID ITEM_CODE STORE_ID STORE_CODE
    101 C 7 77
    100 A
    100 B
    In this table there is relation between item_id and item_code AND
    store_id and store_code. Items and stores have no relationship here. Simply we insert values of both side by side.
    Initial STAGING table
    SNO RNO SCODE RCODE DECODE_STATUS
    101 8 C NP
    101 6 C NP
    101 7 C 77 P
    100 8 A NP
    100 6 A NP
    100 7 A 77 P
    100 8 B NP
    100 6 B NP
    100 7 B 77 P
    Joins:
    SNO=ITEM_ID
    RNO=STORE_ID
    Now I want to update this according to my new decode where NP record will be updated with their new RCODE values
    DECODE table now is
    ITEM_ID ITEM_CODE STORE_ID STORE_CODE
    101 C 8 88
    100 A 7 77
    100 B 6 66
    Now I need my staging table with RCODE values corresponing to DECODE table.
    My expected STAGING table.
    SNO RNO SCODE RCODE DECODE_STATUS
    101 8 C 88 NP
    101 6 C 66 NP
    101 7 C 77 P
    100 8 A 88 NP
    100 6 A 66 NP
    100 7 A 77 P
    100 8 B 88 NP
    100 6 B 66 NP
    100 7 B 77 P
    Please help me to do this ...I have tried with interface where I kept source and target table same staging table and used DECODE for lookup but I didnt get the expected result.

    Hi Chattar ,
    It clearly seems that issue is with Primary keys.
    As you have said about the decode table "In this table there is relation between item_id and item_code AND store_id and store_code. Items and stores have no relationship here. Simply we insert values of both side by side."
    It seems your final update query should be like this :
    update staging1 T
    set (T.rcode, T.scode)
    =
    Select
    (select store_code from decode where store_id = T.RNO ) ,
    (SELECT ITEM_CODe from decode where ITEM_id = T.SNO)
    from dual
    ) where T.decode_status = 'NP';
    If what i have said is right , then you can implement the same using an interface too But first you should decide the Key columns on the target table.
    Hope it solves the issue.
    Edited by: user8427112 on Sep 22, 2012 6:48 AM

  • Help on Delete Internal table records

    Hi,
    I have a internal table with some records in it.
    I need to delete the contents of this based on the condition as below.
    if product_search-Resp_product_company is not initial.
    SORT i_equi BY zzrefeng.
    DELETE i_equi WHERE zzrefeng <> product_search-Resp_product_company.
    endif.
    when i execute this all the records are getting deleted irrespective of the condition mentioned.
    Can anyone help me on this.
    Regards,
    Ram

    Hi,
    Need to delete the records if <b>ZZREFENG</b> does not have the value of <b>product_search-Resp_product_company</b> .
    Here I have product_search-Resp_product_company value as FI14. And also the internal table contains some records with ZZREFENG = FI14.
    I need to delete the internal table records if ZZREFENG <> FI14. But when i execute the statement it is deletng all the records even ZZREFENG = FI14 records also.
    Regards,
    Ram

  • How to delete a master record with transaction data?

    Hi,
        Iam able to delete master record(GL/Vendor/Customer)through OBR2 when there is no transaction data in those respective master records. Despite of clearing all open items in a particular vendor Account, Iam unable to delete that master record. Please suggest me how we can delete vendor master data having transactional data.
                               Thanks in Advance
    Regards,
    Satish

    Hi...
    Not sure whether this helps....you can mark the vendorrecord for deletion and later try to delete it.
    Logistics >> Materials management >> Purchasing >>
    (new menu) Master data >> Vendor >> Central >> Flag for deletion
    try using XK06/FK06
    Assign points if useful
    Regards
    Aravind

  • Procedure to delete Fact Table

    Hi All,
    If I have to rerun my fact table the same day, more than once a day, and if there were rows in it already, I want to delete those rows and reload the fact with current date. I want to create a procedure and include it in the package, the procedure should check for the current_timestamp and if any rows with the that date and if there were any then it should delete it. Please let me know how I can do this. I am running SQL Server - 2008.
    Thanks for your time and help.

    You should have to date in your primary key (ex : in a varchar format like YYYYMMDD).
    Then you have 2 ways to implement it :
    * create an ODI procedure that will delete all data where this date = today. Run this procedure before your interface.
    * or modify your IKM : add a step that will delete the data in the target table where date = today.

  • How to delete child table records while creation reconciliation event

    Hi,
    I developed custom scheduler task to create reconciliation events with child form information:
    if (!reconOperations.ignoreEventAttributeData(objectName, attrs, "Roles", childs)) {
    long eventId = reconOperations.createReconciliationEvent(objectName, attrs, eventAttributes);
    for (int f = 0; f < childs.length; f++) {
    reconOperations.providingAllMultiAttributeData(eventId, "Roles", true);
    reconOperations.addDirectMultiAttributeData(eventId, "Roles", childs[f]);
    reconOperations.finishReconciliationEvent(eventId);
    but when I delete roles from target system roles won't delete from OIM.
    How config recon Operations to do this?

    objName - The Name for the object for which the reconciliation is taking place
    parentRecord - A map containing the field-value pairs for the data received from the target.
    childTableName - The name of the multi-attribute reconciliation field that the data is for
    childRecords - A List containing the Hashtable objects. Every Hashtable will have field-value pairs for the data record pertaining to that attribute received from the target.

  • Order table data with comparing rows

    Hi,
    My question is...
    I have table with with 5 columns this actually is been loaded from a file and there is no direct PK, but for that combination of columns as used to make them unique
    code, person, case
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    07              vv353          7872               0919             FV982     78282
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    01              ab122         0001               1982             AU123     99393
    05              cg899         6728               32322           IKL020     65252
    07              w353          0919                8282             FV982     78282
    now I need to order this data comparing row values of old_id to new_id for each of the combinations of code, person, case
    need output like below
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    01              ab122         0001               1982             AU123     99393
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    05              cg899         6728              32322           IKL020     65252
    07              vv353          7872               0919             FV982     78282
    07              w353          0919                8282            FV982     78282
    hot to get this result, any help is much appreciated..
    Thanks,
    AK.

    Yes you are right, I took it down to edit this in that time you have posted the message...
    Question:
    Table data need to be sorted by matching old_id with new_id
    actual table : here rows are randomly arranged
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    07              vv353          7872               0919             FV982     78282
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    01              ab122         0001               1982             AU123     99393
    05              cg899         6728               32322           IKL020     65252
    07              w353          0919                8282             FV982     78282
    output table: here if you see old_id of row 2 is matched to new_id of row 1.. and so on
    Table X
    CODE             CASE              OLD_ID                NEW_ID            PERSON       AUTH
    01              ab122         1234               0001             AU123     99393
    01              ab122         0001               1982             AU123     99393
    01              ab122         1982               9929             AU123     99393
    04               hjsss         8839                8302            JK920     32320
    05              cg899         6728              32322           IKL020     65252
    07              vv353          7872               0919             FV982     78282
    07              w353          0919                8282            FV982     78282
    so, I need a query where I can generate this output..

  • How to Insert Record with multiple rows

    Hello alls,
    i want to ask something... how to use insert record server behavior -  php myysql, to insert multiple rows from textfiled?
    thanks.

    It would have been more helpful if you had shown me your existing code. However, this shows the basic principles.
    First of all, the name of each input field in the form needs to end in an empty pair of square brackets like this:
    <input type="text" name="field_name[]" . . .
    This results in $_POST['field_name'] being treated as an array of the values in each input field. Change field_name to the actual name of the input field. Without the square brackets, only the last value is submitted by the form.
    The Insert Record server behavior code looks like this:
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO my_table (field1, field2) VALUES (%s, %s)",
                           GetSQLValueString($_POST['field1'], "int"),
                           GetSQLValueString($_POST['field2'], "text"));
      mysql_select_db($database_connAdmin, $connAdmin);
      $Result1 = mysql_query($insertSQL, $connAdmin) or die(mysql_error());
      $insertGoTo = "another_page.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    You need to amend it like this:
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      mysql_select_db($database_connAdmin, $connAdmin);
      // loop through the input values
      for ($i = 0, $len = count($_POST['field1']); $i < $len; $i++) {
          $insertSQL = sprintf("INSERT INTO my_table (field1, field2) VALUES (%s, %s)",
                                GetSQLValueString($_POST['field1'][$i], "int"),
                                GetSQLValueString($_POST['field2'][$i], "text"));
          $Result1 = mysql_query($insertSQL, $connAdmin) or die(mysql_error());
      } // end loop
      $insertGoTo = "another_page.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    This uses a for loop (see http://docs.php.net/manual/en/control-structures.for.php) to access each element of the $_POST['field1'] and $_POST['field2'] arrays (see http://docs.php.net/manual/en/language.types.array.php).

  • Delete and update records in Stored procedures

    I AM NOW STUDYING A STORED PROCEDURE ,AND I ENCOUNTER SOME PROBLEM WITH
    UPDATE AND DELETE SOME RECORD WHICH ONE IS UPDATED OR DELETED,
    THIS IS MY CODE:
    PACKAGE table_of_array IS
    type emp_rec is record(
         empno emp.empno%type,
         ename emp.ename%type,
         sal          emp.sal%type,
         deptno emp.deptno%type
    type arr is table of emp_rec
    index by binary_integer;
    procedure get_data(a in out table_of_array.arr);
    procedure do_insert(a in out table_of_array.arr);
    procedure do_update(a in out table_of_array.arr);
    procedure do_delete(a in out table_of_array.arr);
    END;
    PACKAGE BODY table_of_array IS
    procedure get_data(a in out table_of_array.arr)
    is
    i number:=0;
    begin
         for cur in (select empno,ename,sal,deptno from emp) loop
              a(i):=cur;
              i:=i+1;     
         end loop;
    end;
    procedure do_insert(a in out table_of_array.arr)
    is
         i number:=0;
         cnt number:=a.count;
    begin
         for i in 1..cnt loop
              insert into emp(empno,ename,sal,deptno)
              values(a(i).empno,a(i).ename,a(i).sal,a(i).deptno);
         end loop;
    end;
    procedure do_update(a in out table_of_array.arr)
    is
    begin
         /* WHICH RECORD AND ITEM HAD BEEN UPDATED */
    end;
         procedure do_delete(a in out table_of_array.arr)
         is
         begin
         /* WHICH RECORD HAD BEEN DELETED */      
         end;
    END;

    when you want to update, delete or insert records with a stored procedure you have to provide a procedure that locks the records
    i'll send you an example of an update procedure and a lock procedure
    PROCEDURE p_upd_devices ( resultset IN devtab) IS
    BEGIN
    FOR i IN 1..resultset.COUNT LOOP
              IF resultset(i).zone <> resultset(i).zone_ref THEN
              p_update_zone(resultset(i).zone, resultset(i).mdv_seq);
              END IF;
         END LOOP;
    EXCEPTION WHEN OTHERS THEN
    mecoms_general.logging(0, sqlerrm, 'pck$fill_error_devices.p_upd_devices');
    END; -- p_upd_devices
    PROCEDURE p_update_zone (pi_zone in metering_devices.zne_code%type, pi_device in metering_devices.seq%type) IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
              UPDATE metering_devices
                   SET zne_code = pi_zone
                   WHERE seq = pi_device;
                   commit;
    EXCEPTION WHEN OTHERS THEN
    mecoms_general.logging(0, sqlerrm, 'pck$fill_error_devices.p_update_zone');
    END;
    PROCEDURE p_lock_devices( resultset IN OUT devtab) IS
    BEGIN
    null;
    END;

  • Oracle  deleting rows from tables starting with the name PQ

    hai friends
    we are given access rights to delete only tables starting with PQ. HAVING PQ_NUM as primary key for all the PQ tables.
    totally we have 6 tables. PQ_01,PQ_02, PQ_03,PQ_04,PQ_05,PQ_06.
    ALL This tables will have one primary key. for example pq_01 willl have pq01_num as primarykey and pq_02 table will have pq02_num as primary
    key.
    pq01_num value will exist in all the primary key of pq tables.
    i want query to delete rows from the pq tables based on the input value i give.
    for example if i give primarykey value 122 then that value in pq tables should be deleted.
    One more problem is there. pq_06 table does not have pq02_num column. here the column differs. it is pq06_num_req.
    so give your idea of deleting the rows from pq tables
    waiting
    S

    I dont have access to databse,this is untested
    declare
      v_cmd  varchar2(2000);
      columnname varchar2(30);
    input_value number:=??;
    tabowner varchar2(30):=???
    begin
    --step 1 identify table
      FOR sub IN (SELECT table_name table_to_delete
      FROM all_tables
    WHERE table_name LIKE 'PQ%'
    and owner=tabowner
    ) LOOP
      ----step 2 identify column
    v_cmd :='select t.column_name from all_constraints S,All_Ind_Columns T where
    S.OWNER=T.TABLE_OWNER
    AND S.TABLE_NAME=T.TABLE_NAME
    AND S.INDEX_NAME=T.INDEX_NAME
    and s.owner=tabowner
    AND S.TABLE_NAME='||table_to_delete||'
    and s.constraint_type='''P'';
         execute immediate v_cmd into columnname; 
         --step 3 delete records
        v_cmd := 'delete from '||tabowner||'.' ||
                 sub.table_to_delete || '
       where '||columnname||'='||input_value; 
         execute immediate v_cmd;
        commit;
         END LOOP; 
    end;Edited by: user5495111 on Aug 11, 2009 6:35 AM

  • Opening a IDML File with a table and 1000 rows simply hangs

    Hello,
    1. I generate IDML files that consist of a table with (1000 rows*9 columns)  colour formatted cells. When I try to open the file it just hangs at "Open Document".
    So you're probably thinking, there's something wrong with my IDML File?
    2. I "place" an equivalent spreadsheet from Excel, with formatting. It transfers correctly. I save it as a IDML file, when I go to reopen this file,  same problem as above.
    3. In step 2, If I instead save the file as a INDD, the INDD file re-opens correctly & fast.
    Our company catalogue has about 11728 rows * 9 columns.
    I have a strange sense of Dejavu, and it all seems to be pointing to the way INDESIGN handles (or doesn't handle) XML
    http://forums.adobe.com/thread/756449?tstart=0
    thx

    Sorry for the wall of text!!
    Ya, i figured a non indesign solution was the way to go. Hence the LaTeX (Typesetting) + php thing. It didnt need to be in a table, but it needed to appear like a "table" format. Cells with each cell having borders etc and it will eventually go to print.
    IDX!? I'll need to investigate this file format
    Well not necessary to use excel, or tables, since I pull the information out  from a MySQL database anyway. I wanted to use IDML because once the file format is just simple XML and extremely easy to manipulate. My awesome theory was, if it was already in a table format, that would make it even easier to manipulate - all i would need to do is write php code to add new rows (Directly into the file). A designer could make the IDML file template file for us, and I could write a script that populates the data directly into it.
    We tried other methods such as merging XML into tag placeholders but while that worked fantastically on small amounts of data it grinded to a halt+crash on large amounts of data.
    Ideally we wanted designers to make a template, and I.T. to just come along and insert the data accordingly. It also needed to be perfectly print accurate without alot of messing around. XSLT would be an interesting alternative, but our designers are again not very XSLT / EXCEL/ XML / X-Anything savvy. It would still need to be a programmers nightmare to get it to appear correctly (eg. mine).
    Thanks for pointing out additional alternatives! There are some good things I had not considered.
    Although I have found some additional benefits using LaTeX; Automatic Index, and table of contents  (Sweet!) - it also handles any required text wrapping.
    I think I'm flagging this thread as more of a bug thread than a request for a solution
    We were looking into purchasing indesign server for some future endeavours but if I have no confidence in the desktop version of indesign, how can I be assured that the server version of indesign wont just cause the company more headaches down the line
    thX!! awesome

  • Unable to read E$ table records into excel file in linux machine

    Hi
    I am using below code in ODI procedure to read E$ table record and store it in excel file
    ODI Procedure: Technology=Java Beanshall and Command on Target I written below code and placed it in CKM Oracle KM
    <@
    String OS = System.getProperty("os.name").toLowerCase();
    String v_path="";
    if((OS.indexOf("win") >= 0))
    v_path="D:\Unload_Dir\<%=snpRef.getSession("SESS_NO")%>.xlsx";
    else if (OS.indexOf("mac") >= 0)
    v_path="path details";
    else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 )
    v_path="/odi_a/oracle/Middleware/logs/wcds/odi_logs/<%=snpRef.getSession("SESS_NO")%>.xlsx";
    else if (OS.indexOf("sunos") >= 0)
    v_path="soliaris path";
    @>
    OdiSqlUnload "-FILE=<@=v_path@>" "-DRIVER=<%=odiRef.getInfo("DEST_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("DEST_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("DEST_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("DEST_ENCODED_PASS")%>" "-FILE_FORMAT=VARIABLE" "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1"
    select * from <%=odiRef.getTable("L","ERR_NAME", "W")%>
    But is not reading the data into .xlsx file ,
    Please help me it is very urgent
    Can I use below code
    String os = "";
    if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
    os = "windows";
    } else if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) {
    os = "linux";
    } else if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) {
    os = "mac";
    T
    his is high priority, please help me urgent
    Regards,
    Phanikanth
    Edited by: Phanikanth on Feb 28, 2013 5:43 AM
    Edited by: Phanikanth on Feb 28, 2013 6:00 AM
    Edited by: Phanikanth on Feb 28, 2013 7:42 AM

    Hi,
    can you describe what is happening when you run the ODI procedure described below:
    - Does the procedure fail with an error, if yes, which error(full details)?
    - Does the procedure pass but no xslx file is been created?
    - Does the procedure pass and an xslx file is been created, but Excel can't read it? If yes, what is the structure of the xslx file when read in an editor?
    What I can see from your code below is that you have choosen -FILE_FORMAT=VARIABLE, but the XSLX format is supposed to be XML.
    Regards,
    Alex

  • Deleting 5 million records(slowness issue)

    Hi guys ,
    we are trying to delete 5 million records with following query .it is taking more time(more than 2 hours).
    delete from <table_name> where date<condition_DT;
    FYI
    * Table is partioned table
    * Primary Key is there
    Pls assist us on this .

    >
    we are trying to delete 5 million records with following query .it is taking more time(more than 2 hours).
    delete from <table_name> where date<condition_DT;
    FYI
    * Table is partioned table
    * Primary Key is there
    Pls assist us on this .
    >
    Nothing much you can do.
    About the only alternatives are
    1) create a new table that copies the records you want to keep. Then drop the old table and rename the new one to the old name. If you are deleting most of the records this is a good approach.
    2) create a new table that copies the records you want to keepl. Then truncate the partitions of the old table and use partition exchange to put the data back.
    3) delete the data in smaller batches of 100K records or so each. You could do this by using a different date value in the WHERE clause. Delete data < 2003, then delete data < 2004 and so on.
    4. If you want to delete all data in a partition you can just truncate the partition. That is the approach to use if you partition by date and are trying to remove older data.

Maybe you are looking for

  • Illustrator CC won't open

    Hi-- I just tried to open AI from Creative Cloud and it won't open. This may have had to do with a cleanup operation I did yesterday. Here's the problem report. I have no idea what to make of it. Can anyone help? Process:         Adobe Illustrator [1

  • How to update my i-Phone 4?

    Hello Apple friends, My i-Phone 4 has never had any updates untill my apps didn't want to open anymore. I tried to install iOS6 with i-Tunes and I downloaded the latest version of i-Tunes 10.7.0.21. If I plug my i-Phone to my computer it asks me if I

  • Print Will Not Print

    We have a HP laserjet 100 color MFP M175nw All-in-One printer.  There are currently 3 computers hooked to it via a wired network.  However, only one of the computers can print to it.  The only way that you can get the other computers to print to it i

  • How do I edit my photos in iphoto? I want to straighten photos and remove some of the dead area.

    how do I edit my photos in iphoto? Specifically,I want to straighten photos and remove some of the dead (blank) area around the photos.

  • Accidentally purchased a game twice, can I get a refund?

    Last night, I bought the Monopoly Plus and Final Fantasy XIV Online. After the purchase, I checked the Monopoly Plus from the PS Store just to be sure that I got it and it says "Purchased". Then I checked the Final Fantasy XIV Online and did not see