Delete multiple records in the table...

Hello

I have a table with 720 000 records, I want to delete records for the date of joining i, e for 20/10/2008. To this date there 1065 records. can I use a simple delete for this statement?

Delete from Test where Join_date = 20 October 2008 ';

Is this is a good way to do it? Any suggestion splease.


Thank you!!

Hello

user642297 wrote:
Hello

I have a table with 720 000 records, I want to delete records for the date of joining i, e for 20/10/2008. To this date there 1065 records. can I use a simple delete for this statement?

Delete from Test where Join_date = 20 October 2008 ';

Is this is a good way to do it? Any suggestion splease.

Thank you!!

Yes, you can use statements like this to delete several lines at once.

Remember that all DATEs include a time. The statement you posted only deletes the lines dated at midnight (that is, 20 October 2008 00:00:00).
To remove all the same day, regardless of the time, say

WHERE   Join_date >= TO_DATE ('20-oct-2008', 'dd-mon-yyyy')
  AND   Join_date <  TO_DATE ('21-oct-2008', 'dd-mon-yyyy')

If encoding time is more valuable than the run time, one could also say:

WHERE   TRUNC (Join_date) = TO_DATE ('20-oct-2008', 'dd-mon-yyyy')

Tags: Database

Similar Questions

  • Delete multiple rows in the table.

    How to remove several rows in the table at the same time?

    I have a table with 10 rows.

    I have a loop for delete lines 1, 3 and 6.

    It deletes the row 1 and 3 of the Index out of Bounds exception.

    I know why this is happening.

    I'm looking for a function or something to delete several lines at once?

    Thank you

    It must be a logic error.

    For each row, you delete, you should reduce the number of indexes.

    For example

    If you want to delete lines 1, 3 and 6 of a table that contains 6 rows

    Remove row1 as Table.Row [0].instanceManager.removeInstance ();    [now how many lines will become 5]

    Remove row3 as Table.Row [1].instanceManager.removeInstance ();     [Note that index is 1 because you have already deleted a record, and the index starts at 0.

    Remove row6 as Table.Row [3].instanceManager.removeinstance ();      [already two deleted record, so 6-2-1 = 3 is your index to remove]

    You understand the logic?

    Nith

  • PHP - delete multiple records in the database by using the checkboxes?

    It took zillions of times over the years, BUT my Google search has been exhausted. I can't find a coherent tutorial or explanation on how to do this.

    Someone else has a link to a tutorial?

    I found and implemented, with a few tweaks, which updates several records of price field. Most likely the removal works in a similar way, by making a loop on all records, but can't get my head around it for the moment.

    See you soon

    Operating system.

    OK, even once, the warning I ever wrote a single php page. But try this.

    Once again, use it for your form fields in the repeat region.

    and for your delete statement

    {foreach ($_POST ['action'] as $dayID)}

    $query = 'DELETE days WHERE the dayID = $dayID;

    mysql_query ($Query) or die ("' error in query: $query '");

    }

    > The data type for the field of dayID is int, is the primary car key.

    FYI - given that the data type is numeric, you do not need to pack quotes around it.

  • Impossible to delete the record from the table using the form

    I have a stored procedure (function, actually) that allows an administrator to manually delete a record in a table.

    When I call my form there will be no effect. The record remains in the table.

    In both cases, I connect to the database to the same user.

    I am able to call a test function in the database which returns a field in the record, so I think I can at least communicate with and retrieve results from the database using a stored function. As soon as I approach him "select" "delete from", no luck.

    If I try to run the SQL in my form with a statement of FORMS_DDL, it seems to run smoothly when I not in the code in the debugger, but it had no effect. FORMS_SUCCESS reports TRUE if DBMS_ERROR_TEXT has the following: ORA-01403: no data found. I don't know how the DBMS_ERROR_TEXT is that FORMS_SUCCESS is not set to FALSE.

    Any ideas as to why I am unable to remove using my form but can when you call the function registered directly/manually?

    Using Oracle Forms & DB 10.0.2.0.1.

    Patrick,

    After each Insert / Update / Delete statement, you have to COMMIT . Then only it will be in select statements.

    Kind regards

    Manu.

  • How can I recover only odd or even number of records in the table?

    Hello

    How can I recover only odd or even number of records in the table?

    Thank you

    Hi IndiMinds,

    Alternatively, you can use in queries. :

    Odd:

    SELECT *.

    Of

    (SELECT rownum row_count, id, name FROM bigemp

    )

    WHERE mod (row_count, 2) = 1;

    Still:

    SELECT *.

    Of

    (SELECT rownum row_count, id, name FROM bigemp

    )

    WHERE mod (row_count, 2) = 0;

    Thank you

  • to insert multiple records in another table

    Hi all;

    How can I increase the number of records in the table?

    SQL > insert into tab2 to select * From tab1;

    Enter tab2 to select * From tab1

    *

    ERROR on line 1:

    ORA-00926: lack of keyword VALUES

    Hi try this...

    Insert in tab2 select * from tab1

  • Not able to read the values in group by, when no records in the table

    Hi all, I have this query

    Select p.header_id,

    Type "some_constant."

    sum (nvl (p.total_amount, 0)) sum_of

    from table_name p

    P.header_id group

    When there is record in the table, it works fine, but I want to if there is no any folder that it returns as below,

    header_id type sum_of

    some_constant 0 0

    How to...?

    Help, please.

    Kind regards

    SELECT * FROM (select p.header_id,

    Type "some_constant."

    sum (nvl (p.total_amount, 0)) sum_of

    from table_name p

    P.header_id group

    UNION ALL

    SELECT 0,

    BOX WHEN (SELECT COUNT (*) FROM table_name) = 0 THEN type of 'some_constant',

    ANOTHER NULL

    END type as,

    0

    THE DOUBLE)

    WHERE type IS NOT NULL;

    Post edited by: 000000

  • Total number of records in the table read

    Here is the procedure to read total no of record in the table specified by the user during execution. But it still gives the same answer for all the table. Can someone help me?

    create or replace procedure p3 (varchar2, not on the number tab)
    as
    Start
    Select count (*) from no tab;
    end;

    You need dynamic SQL statements.

    Or:
    http://laurentschneider.com/wordpress/2007/04/how-do-i-store-the-counts-of-all-tables.html
    To get the name of the Table and no lines
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:1725645184471282:P11_QUESTION_ID:1660875645686

    Or simply use the data dictionary, collect statistics of the table, then:
    Select table_name, num_rows from user_tables;

  • How to find inserted last record in the table.

    Version: Oracle 10g

    I have a table called 'Manufacturing' and 3 columns as mfno, itemname, quantity.
    How to find inserted last record in the table 'manufacturing '.

    As I got to know that the Rowid is not a result perfect result. Please provide your inputs.

    user13416294 wrote:
    Version: Oracle 10g

    This is not a version. It's a product name. A version is 10.1.0.2 or 10.2.0.4, etc.

    I have a table called 'Manufacturing' and 3 columns as mfno, itemname, quantity.
    How to find inserted last record in the table 'manufacturing '.

    Not possible as your data model do not answer for him. As simple as that.

    If there is a need to determine an order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or several attributes are necessary to represent this information. Your data model in this case is therefore unable to meet your requirements.

    If the requirements are valid, set the data model. In other words - your question has nothing to do with Oracle and nothing to do with the other pseudo columns in Oracle, the rowscn or the rowid. It is a question of pure data modeling. Nothing more.

  • Create record in the Table of results gives error

    Hi all

    Update page there is a table of results with the Add button to create a new line.

    Everything by creating a new record on the table of results gives an error

    The attributes defined for AccessId in the view object xxlcupdvariablesvo1 failed

    I checked the EO and VO attributes, everything seems to be good.
    Updatable also has the value "Always".


    Still don't know why this error is coming.

    Please help resolve this error.


    Thank you
    SK

    SK

    Don't forget that your AO made correctly and you do your from VO of the two OS after this AO. If possible, allow Jdev to create your AO. Try to create is not in manuallly

    Hope it solves your problem

    Thank you
    AJ

  • Add new records to the table of the ADF

    Hello

    I use Jdev 11.1.1.3.0.
    I have a Page of the ADF with detail Table of form - master, I want to add new records to the table reflecting in DB. Is it possible to do? pointers or demo?


    Thank you
    MB

    What are the components are used in your table? When you created the table originally, you specified as a table read-only? If your table contains components of af: outputText, then you will need either manually change components entry way, or remove the table and re-drop-the-in the form of table (not read-only)

    John

  • Form check synchronize on Popup to the selected record from the table

    I'm trying to recreate what I did on the portals of the OAS in Weblogic/ADF. I have JDeveloper 11.1.1.2.0. What I do seems to be a little different than the tutorials: I need something like the tutorial master-detail, but instead the details appearing on the same page, it should appear in a popup. I managed to build the part table/popup. But when the popup appears, it displays the wrong record. Here are the steps I used to create this page:

    After you create the ADF Fusion Middleware project:

    1 create templates for the tables I need.
    2. create the JSF Page.
    3 drop panelCollection on the page.
    4. remove my data to see in panelCollection control and choose the Table read-only ADF. Select the sorting and selection options.
    5 change table properties: selected = DisplayRow, EditingMode = clickToEdit
    6 drag the Popup on the page.
    7. remove my data from view in popup control and choose the form of the ADF. Select the send option.
    8 drop showPopupBehavior on the page. Name of the popup. The value triggerType to the 'selection '. (triggerType "click" works, too)
    9 deploy.

    The table is displayed. I click on a line. The pop-up window appears. The form of popup displays the first record in the table. I click on any line.

    I just bought the merger Oracle 11g Developer Guide, but were not able to answer this question yet.

    Any ideas?

    Thank you.

    See this video for how it works for me:
    http://www.ScreenToaster.com/watch/stWUtcRkVLQ1BcSV1aX15Q

  • [ADF, JDev 12.1.3] How to display multiple records on the same page... not in a table but they appear a form for each record

    Hallo,

    I need to create a page that displays the records of a VO, but I would not use a table.

    Instead, I would like to display a form for each record to be displayed.

    Forms must appear one above the other and each form should have 2 buttons: one to remove the file/form itself and one to add a new file/form.

    When you press the button Add a new empty form should be dynamically added to the page (so that the user can fill) and created related record.

    When REMOVE button is pressed the form (which contains the operated button) should be disappear and the record shuould be deleted.

    Creations and destruction must be applied only if the user clicks a button on CONFIRMATION / COMMIT.

    Maybe this http://digilander.libero.it/flattit82/OTN_FILES/MultiFormPage.png picture can help to understand what I want to do.

    You kindly help me?

    Thank you

    Federico

    Hi Federico

    I was saying that your page layout can be achieved using af: table

    See this image:

    This provision is af:table (I think same as yours), just add a column in the table and put all the fields in this column then correct layout allows to design as a provision on the form or group layouts

    I'm not saying it's the best approach, but you can try this

    Thank you

  • delete a multiple record in slot table with checkbox form.

    Hello guys,.

    I need your suggestions...


    I have the block master detail. (SECTION and INSTRUCTOR)

    The retail block, I add checkbox element (name: RB_SECTION_ID) with part of database 'No' and when to check the value: SECTION_ID (on property).

    I do a DELETE button. The trigger was the DELETION of the ARTICLE where section_id =: SECTION. RB_SECTION_ID and
    instructor_id =: are you doing. INSTRUCTOR_ID;

    but it does not work.

    How delete us record multiple check multiple check box, and then click DELETE... ??


    View.

    NIA...

    Because your delete statement reflected until it is saved or re-queryied...

    Add Lee after the END of the LOOP;
    execute_query (no_validate);

  • Insert multiple records in the single form

    Hi all

    I met already insert many rows into a table using ADF BC. The solution is in the following thread

    Re: How to create several new lines in the Table of the ADF?

    However,.
    The above solution is useful when you want to enter new values as well as all the table entries is displayed.
    What can I do if I don't want all values in the table, but just a page 'AddEntries' where I can only add new lines without going through the table entries is displayed.

    As,

    Say a form has 5 rows

    Each line has empId, eMailSlNo, send attributes

    EmpId is the same for all 5 recordings but emailId is different.

    EmpId eMailSlNo plus the PK.

    empId generated by the sequence.

    Now, on presentation of the form, I want all five records to be inserted.

    (can I use ADF form instead of the table of the ADF for the ViewObject in this case. I tried ADF form but I could only insert 1 plug at the same time).

    I use 10.1.3.4

    Help, please.

    Thanks in advance,
    Shri

    Published by: newtoOTN on December 29, 2009 18:02

    Shri salvation,

    ADF form is intended for the single insert/update. For multiple insert/update/delete using the collection as table UI is preferred. I guess your db table or table design INTERFACE default (in my opinion but I do not know your usecase entirely, so I guess might b wrong).

    I would say,

    -make EmpId as PK
    -have another table to store EmpId (foreign key), emailSiNo, email
    -Having the relationship of the master / detail between the British Colombia ADF db tables.
    -Create master / detail UI and on the selection of the master, view the details and if no record is found does not add files and commit.

    See these examples:
    http://www.Oracle.com/technology/products/jdev/tips/Mills/MasterDetailSync/Master_Detail_Synchronization_in_ADF_Faces.html
    http://andrejusb.blogspot.com/2007/06/create-edit-and-delete-operations-in.html

    Hope it makes sense.

    ~ K

Maybe you are looking for