take the export a table excluding records from 6 days back

Hello

Hoe can I take backup of a particular by exp table as it was before 7 days... I want to take the export backup of a particular table today means, but I do want the records inside except the last recordings of 6 days.

Please suggest

Create the table temp_XXXX as
Select * from Table_original
where Col_with_date = 'today ';

Tags: Database

Similar Questions

  • How to exclude records from the outer query

    My apologies if this was requested. I find no answer. I don't know what terminology should be for that matter.

    In simple terms, I want to use the custom in where clause to select records. Problem is function will fail if applied to old records, as there was no relevant data. I have logic to exclude old records, but the problem is that this process running function before old records are excluded. I tried an inside view to exclude records before their passage in the outer query, but this does not resolve the situation.

    Below shows high level required

    Select x

    tab

    where (condition to exclude the old records)

    and function (tab.y) = value

    If I rewrite as below, still have the problem. Was hoping to exclude former records apply before function.

    Select inn.x

    Of

    (select x,

    There

    tab

    where (condition to exclude the old records)) inn

    where function (inn.y) = value

    Thank you

    Hello

    Including ROWNUM in the result set of the query-void will force the subquery to do first:

    Select inn.x

    Of

    (select x,

    There,

    ROWNUM AS r

    tab

    where (condition to exclude the old records)

    ) inn

    where the function (inn.y) = some_value

    Since ROWNUM depends on the WHERE clause of the query-sup, the query cannot be rewritten to the main to do first query WHERE clause.

  • Differences in the use of RowSetIterator reading records from a VO?

    Hi experts,

    I use Jdev 11.1.1.1.5 and 12.1.3, and I would like to know what is the difference between browse a VO using a RowSetIterator or not it:


    Example 1: Don't use NOT iterator:

    ViewObjectImpl viewObject = getEmployeesView();  
    viewObject.executeQuery();  
    while (viewObject.hasNext()) {  
     Row row = viewObject.next();  
     // DO what do you want in Row  
    }  
    

    Example 2: Use of iterator:

    ViewObjectImpl viewObject = getEmployeesView();  
    RowSetIterator rsIterator = viewObject.createRowSetIterator(null);  
    rsIterator.reset();  
    while (rsIterator.hasNext()) {  
     Row row = rsIterator.next();  
     // DO what do you want in Row  
    }  
    rsIterator.closeRowSetIterator();
    

    Kind regards

    Jose.

    ViewObject.next (unless delegated) RowSetIterator:

    https://docs.Oracle.com/CD/E12839_01/apirefs.1111/e10653/Oracle/JBO/Server/ViewObjectImpl.html#next%28%29

    While, in example 2, you are created again, second RowSetIterator.

    There is no diff. except that you can have two lines of different currents in two cases of iterator...

  • My Vista theme, replaced by the classic theme of the Windows while it's self from one day to the next.

    Last night, I used my computer and everything was fine. I used it up to this as 02:00, and everything was fine. When I got up at 8 this morning to get ready for work, I did my usual ritual (bathroom, breakfast, facebook, shower, leaves), and when I got to the part of facebook, I turned on my laptop and noticed he was in the classic view. I searched through every place I can think of (all settings for themes and personalization Control Panel) and found nothing. In particular, when I went to "Change theme" it only shows "Windows classic" as the only option. It bothers me because I hate the Windows Classic view. I mean, it does not affect the functionality of the computer, he looks really old and it's annoying that it cannot be corrected.

    Hello

    The themes service may be having a problem and stopped, we will check:

    1. Windows key + R, in the Run dialog box type services.msc

    2. once in Services, find themes, double click it and make sure that it is set to Automatic and started. If this isn't the case, fix and start it.

    Kind regards

    Patrick

  • Export of more than 65000 record from oracle's 10 g to Excel

    I try to export more than 65000 record from oracle 10g to Excel, formulas using the report execution as a form of the oracle spreadsheet, but if note the limeted and increase when I found error.

    Gently, I found solution for this error without use package in the database and the directory in the server

    Thank you very much for the cooperation.

    I got a solution to my problem I using webutil and who is as follows:

    DECLARE

    A CURSOR IS

    SELECT column_1, column_2, column_3

    Of

    your table;

    path varchar2 (200);

    IN_FILE CLIENT_TEXT_IO. TYPE_DE_FICHIER;

    BEGIN

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

    Path: = webutil_file.file_save_dialog (", file_name-online 'Summary': sysdate |'.) CSV ', File_Filter => ' CSV (*.csv) files. (* .csv |') ;

    IF file_name IS NULL

    THEN

    TAKE A BREAK;

    ON THE OTHER

    IN_FILE: = CLIENT_TEXT_IO. FOPEN (PATH: '.) CSV', 'a');

    CLIENT_TEXT_IO. Put_line (IN_FILE, 'title_1; title_2; title_3');

    I'M IN A LOOP

    : HAND. COUNT: = A % ROWCOUNT; -counter

    CLIENT_TEXT_IO. Put_line (IN_FILE, I.column_1 | ';' |) I.column_1 | ';' | I.column_1);

    Synchronize;

    END LOOP;

    CLIENT_TEXT_IO. FCLOSE (IN_FILE);

    IF Form_Success THEN

    END IF;

    END IF;

    END;

    Thanks again

    concerning

    ELIE SAID

  • Among the data tables is missing from the 11g database. How to restore?

    Hello

    In my development 11G database, one database of tables is missed on Sept. 4.

    I have available valid RMAN backups, to restore the missing data in table I intend to do the following steps:-

    (1) create a new database
    (2) restore the fresh 3 taken rman sep to the DB Backup
    (3) now take the export of backup in the table whose data are not being met since the new database
    (4) import the exported backup of the old DB table.


    Is it the right way, I think? or any other alternative method that we have?

    Please suggest.


    Thanks in advance,
    Florine Reddy
    1) Create a fresh DB
    2) Restore the rman backup taken on 3rd sep to the fresh DB
    3) Now take the export backup of the table which the data is missed from the new DB
    4) Import the exported backup of the table to the old DB.
    

    fix!

  • How take the sum of middle iteration last iteration?

    Hello! PLS, can anyone help, I have six variables and you want to take the sum of each of the variables separately from the middle of the iteration to the last iteration (i.e. iteration 6 iteration 12). Attached are the vi file and data entry.

    I won't mess with your design of control thingy... but here is the simple and direct way to the sum of the average in last interation.  I use random numbers here, but you can enter your own values once you get out your straigthend formula.

    Basically, it works like this: feed values into a tunnel of indexation.  Which will make each set of values in an array whose length N where N is the number of iterations.

    Find the array size and divide by 2.  Remember that arrays start at index zero, so 12 iterations will give you 0,1,2,3,4,5,6,7,8,9,10,11.

    You want the second half, so it's 6,7,8,9,10 and 11.  Subset of the table to select 6 elements, starting with element 6... Then take the sum of table.

  • ODI smartexport gives an error of the ODI-26187 when generating the report. How can I check the export?

    MikeODI_11.1.1.6.0

    We increased the limits of segment memory of Java in the ide.conf for our ODI client file to allow intelligent export of our project to complete.

    AddVMOption-Xmx4112M

    AddVMOption-Xms1024M

    Export begins, ending the dependency checking,

    Displays the tree of objects to export

    create the export file

    shows messages from report production

    but gives error

    ODI-26187: unexpected i/o error has occurred.

    Click Ok to the error and the report view page, but the page is empty.

    The backup option, creates the xml log file, but I still have to find how to display useful.




    How successful or otherwise export determined?

    Mike.


    When you connect a SR with Oracle it I see what a bug fixed by a patch for 11.1.1.6.5 or sets of the 12 c.  So I suspect that my solution is to upgrade.

  • Compare the records from the same table

    Hi all

    I have this sample, the data were rendered are group by my_id, the same number of records exist for the two my_ids (2 and 62) as:

    create table myTest as
    (
    my_id number, 
    fieldA varchar2, 
    fieldB number, 
    fieldC number, 
    cost_A number, 
    cost_B number
    )
    
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (2, 'MAINT', 60, 5, 10.3, 15.00);
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (2, 'MAINT', 70, 6, 20.3, 25.00);
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (2, 'MAINT', 80, 7, 30.3, 35.00);
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (62, 'MAINT', 60, 5, 10.3, 5.00);
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (62, 'MAINT', 70, 6, 20.3, 25.00);
    insert into myTest (my_id, fieldA, fieldB, fieldC, cost_A, cost_B)
    values (62, 'MAINT', 80, 7, 10.3, 15.00);
    

    How can display the records with numbers of different costs for the same unique key (fieldA, fieldB and FieldC)?

    With the help of Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0.

    I hope that my message is clear.

    Thank you!

    Hello

    user9542267 wrote:

    ... I need all the exits...

    Me too.  Always show the complete, accurate, results you want from the data provided.  If you want 2 rows at the exit point, don't tell you want 1.

    Here are the results you want?

    MY_ID FIELDA, FIELDB, FIELDC OLD_COST_A COST_A OLD_COST_B COST_B

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

    MAINT 62 60 5 10.3 10.3 15 5

    MAINT 62 80 7 30.3 10.3 35 15

    If so, here's a way to get them:

    WITH got_old_costs AS

    (

    SELECT fielda, fieldb, fieldc, cost_a, my_id, cost_b

    , LAG (cost_a) OVER (PARTITION BY fielda, fieldb, fieldc)

    ORDER BY my_id

    ) AS old_cost_a

    , LAG (cost_b) OVER (PARTITION BY fielda, fieldb, fieldc)

    ORDER BY my_id

    ) AS old_cost_b

    OF mytest

    WHERE my_id IN (2, 62)

    )

    SELECT my_id, fielda, fieldb, fieldc

    old_cost_a, cost_a

    old_cost_b, cost_b

    OF got_old_costs

    WHERE my_id = 62

    AND (cost_a <> old_cost_a)

    OR cost_b <> old_cost_b

    )

    ORDER BY fielda, fieldb, fieldc

    ;

  • Take the time to navigate from one field to another field or record to another record.

    Hi all

    We are facing a problem in our forms, when navigate us from one field to another field or move a recording to below the record in the block of retail then it takes 4 to 5 seconds to navigate.

    It's unusual behavior, sometimes it works very well and long takes the time to browse.

    Here's our environment:

    Server configuration:

    Oracle Fusion Middleware 11g (10.3.6)

    Oracle 11 g Release2 forms and reports services

    Oracle Database 11g Release2

    Client side:

    Browser = Internet Explorer (8.0.6)

    Java 7 update 45 (build 1.7.0_45 - b18)

    Kind regards

    Omer

    Questions about the customer like this are typically Java associate.  Have you tried to clear the Java Cache on the affected workstations?

    Craig...

  • help in registration of the records from two tables

    HI: I have two tables joined the first field. The field is the primary key in the first table. Need help listing records from both tables with each a line/record results.
    create table EVENTS (
    event_key varchar2(64) primary key,
    event_description varchar2(64),
    create_time int
    );
    
    
    create table EVENT_UPDATES (
    event_key varchar2(64) NOT NULL ,
    update_description varchar2(64),
    update_time int
    );
    
    
    insert into EVENTS values('Event1', 'This is event1', 1);
    insert into EVENT_UPDATES values('Event1', 'Ticket created', 3);
    insert into EVENT_UPDATES values('Event1', 'Event cleared', 10);
    insert into EVENTS values('Event2', 'This is event2', 4);
    insert into EVENT_UPDATES values('Event2', 'Ticket created', 6);
    insert into EVENT_UPDATES values('Event2', 'Event cleared', 8);
    I want to print each record in the table of EVENTS such as a line and the corresponding records in EVENT_UPDATES as a line like this record
    Event1   1     This is event1
                3     Ticket created
                10   Event cleared
    Event2   4     This is event2
                6     Ticket created
                8     Event cleared
    TIA
    Ravi
    select  case weight
              when 1 then event_key
            end key,
            time_val,
            description
      from  (
              select  event_key,
                      create_time time_val,
                      event_description description,
                      1 weight
                from  events
             union all
              select  event_key,
                      update_time,
                      update_description,
                      2 weight
                from  event_updates
            )
      order by event_key,
               weight
    /
    
    KEY          TIME_VAL DESCRIPTION
    ---------- ---------- -------------------------
    Event1              1 This is event1
                        3 Ticket created
                       10 Event cleared
    Event2              4 This is event2
                        6 Ticket created
                        8 Event cleared
    
    6 rows selected.
    
    SQL> 
    

    SY.

  • remove the last record from the plsql table

    TYPE r_LOOPElement IS RECORD (TermID   NUMBER 
                                          );
    
    TYPE t_LOOPType IS TABLE OF r_LOOPElement INDEX BY BINARY_INTEGER;
    i_CustomerLoop      t_LOOPType ;
    
    i_CustomerLoop(1).TermID=1;
    i_CustomerLoop(2).TermID=2;
    i_CustomerLoop(3).TermID=3;
    Under certain conditions, I need to remove the last record from i_CustomerLoop

    whichi s the best way to do it. because I sometimes get duplicates for TermID in this plsql table.

    Hello

    See [removing items from Collection (DELETE method) | http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/collections.htm#CJAFGFIG]

    Kind regards

  • Unable to export specific tables in the schema.

    I created a schema duser, the data is imported and now I want to take some pictures from this scheme.
    the tables are (partyhdr, partyaddressdtl, partycontactdtl, partydsdtl, partytdsexcludedtl, partycurrencydtl)


    D:\ > EXP FILE DUSER/LOG@ORCL = 20121221PARTY0228PM. DMP TABLES = PARTYHDR, PARTYADDRESS
    DTL, PARTYCONTACTDTL, PARTYTDSDTL, PARTYTDSEXCLUDEDTL, PARTYCURRENCYDTL;

    Export: Release 10.1.0.2.0 - Production on Fri dec 21 14:30:21 2012
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Release 10.1.0.2.0 - Production
    Export performed WE8MSWIN1252 and AL16UTF16 NCHAR character set
    About to export specified tables by conventional means...
    . . export of table PARTYHDR 19387 rows exported
    . . export of table PARTYADDRESSDTL 20747 rows exported
    . . export the PARTYCONTACTDTL 226 exported table rows
    . . export the PARTYTDSDTL 53 exported table rows
    . . export the PARTYTDSEXCLUDEDTL 2 exported table rows
    EXP-00011: DUSER. PARTYCURRENCYDTL; There is no
    Export completed successfully with warnings.

    as I check table in schema partycurrencydtl is their AND MONTRANT RECORDS.

    SELECT OBJECT_TYPE OBJECT WHERE OWNER = 'DUSER' AND OBJECT_NAME = "PARTYCURRENCYDTL";

    OBJECT_TYPE
    -------------------
    TABLE

    I can understand why this particular table does not export.

    Kindly help.

    Please use the below command without semicolon

    EXP FILE = 20121221PARTY0228PM DUSER/LOG@ORCL. DMP TABLES = PARTYHDR, PARTYADDRESS
    DTL, PARTYCONTACTDTL, PARTYTDSDTL, PARTYTDSEXCLUDEDTL, PARTYCURRENCYDTL

  • Retrieve the random record from SQL and also an ORDER

    I need a query that is able to get X amount of random records from a database of SQL2008, but I also want those results to then order by a field in the same table numberic, camp_priority

    I have

    SELECT TOP #DisplayAmount #, camp_uid, camp_title, camp_text, camp_image_type
    Campaigns
    WHERE camp_uid IN

    etc... etc.

    then, at the bottom, I

    ORDER BY newid (), camp_priority

    The problem seems to be that I'm random records, but it is not ordered by the camp_priority

    Anyone have any ideas?

    Thank you

    Mark

    Hey Adam,.

    I misread your original post, now I see how it was supposed to work, just posted below... got it works... works very well. If all goes well, is not to kill the CPU that this query will use a LOT... I'll just take a plu ;-) CPU

    Regarding the performance of NEWID() issue, I do not have a specific link, I was just hunting around different forums etc and found a few posts that talked about performance issues and who had a command I never saw that took a percentage of files with a lot of perfomance test graphic showing it was 10 times slow the other approach.

    I'll just have to see how it goes

    Thanks for the help

    Mark

  • Fixed writing the length of records from flat file

    Hi all
    I have a program to write the table data to a file. The sql for this code might look as below:

    for r in select * from tablexx partition (partn_nm)
    loop
    UTL_FILE. PUT_LINE (V_FILE, V_BUFFER);
    end loop;

    The problem is with the name of patition. This is not a fixed value, and continues to change.
    How can I change the name of the partition on the fly. Something like

    v_part_nm: = 'JAN2008;
    for r in select * from tablexx partition (v_part_nm)
    loop
    UTL_FILE. PUT_LINE (V_FILE, V_BUFFER);
    end loop;

    Please give suggestions...

    Thank you

    Published by: user627047 on March 23, 2010 01:16

    user627047 wrote:
    I fight to keep away the comma in the data file. My code is as below

    open SQL_CUR for q'X SELECT rpad(C_GRP_PROD,3)||','|| rpad(N_ACCT,23)||','||rpad(to_char(N_CUST)            from TRMD501_BAK partition( X'||V_DROP_PARTN_NM||')'    ;
    loop
    fetch SQL_CUR into V_BUFFER;
    exit when SQL_CUR%notfound;
    utl_file.put_line(V_FILE, V_BUFFER);
    V_LINES := V_LINES + 1;
    end loop;
    

    Can someone tell me please how to write a record length of fiixed without commas.

    Thank you

    UH... maybe try to take the commas out of it?  :|

     open SQL_CUR for q'X SELECT rpad(C_GRP_PROD,3,' ')||rpad(N_ACCT,23,' ')||rpad(to_char(N_CUST),10,'') from TRMD501_BAK partition( X'||V_DROP_PARTN_NM||')'    ;
                    loop
                            fetch SQL_CUR into V_BUFFER;
                            exit when SQL_CUR%notfound;
                            utl_file.put_line(V_FILE, V_BUFFER);
                            V_LINES := V_LINES + 1;
                    end loop;
    

Maybe you are looking for