Posting date for Millions of records

Hi all

I need to do a validation of date (if the format is 'YYYYMMDDHH24MISS') in the oracle table that has millions of records. Currently, invalid format files are pushed into a separate table. I use a function and procedure that does this task, but it takes 1 min for 1 million files which is very expensive.

Kindly let me know if we have any other alternative that will give a better Performance? or refine bleow queries to make it efficient.

Function:
create or replace the FUNCTION VALIDATION1(PARAM IN VARCHAR2) RETURN VARCHAR2
AS
NUMBER1 NUMBER;
DATE1 DATE;
BEGIN
DATE1: = TO_DATE (PARAM, 'MMYYYYDDHH24MISS');
BACK TO 'Y '.
EXCEPTION
WHEN OTHERS THEN COME BACK 'N';
END;

Procedure:
create or replace PROCEDURE VALIDATE_DATE_INS AS
VAR1 VARCHAR2 (1);
CURSOR C1 IS SELECT ROW_ID, CUST_NEWJOINEE JOIN_DATE;
BEGIN
FOR LAST_UPDATE IN C1
LOOP
VAR1: = VALIDATION1 (LAST_UPDATE. JOIN_DATE);
VAR1 = 'N' IF THEN

Insert into Error_Tracker values (LAST_UPDATE. ROW_ID, 'Y', "Date Format mismatch");
END IF;
END LOOP;
COMMIT;
END VALIDATE_DATE_INS;

Thanks in advance,
RAM Mohan T

Try this

Replace the slider by Jet sql.

CREATE OR REPLACE FUNCTION VALIDATION1
(
   PARAM IN VARCHAR2
)
RETURN DATE
AS
   DATE1 DATE;
BEGIN
   DATE1 := TO_DATE(PARAM,'MMYYYYDDHH24MISS');
   RETURN DATE1;
EXCEPTION
   WHEN OTHERS THEN RETURN NULL;
END; 

CREATE OR REPLACE PROCEDURE VALIDATE_DATE_INS
AS
BEGIN
   Insert into Error_Tracker
   SELECT ROW_ID
         ,'Y'
         'Date Format Mismatch'
    FROM CUST_NEWJOINEE;
   WHERE VALIDATION1(JOIN_DATE) IS NULL 

   COMMIT;
END VALIDATE_DATE_INS;

Concerning
Arun

Tags: Database

Similar Questions

  • Logic of update for millions of records

    Hi gurus

    Just for the purpose of learning:

    If I have 2 tables, one table has 4 million records and table b has 2 million records, both have a common column 1 x to join.

    Now I want to update table b using the join condition, then what should be the effective way to update table b...

    By my understanding, we can use it by using the options below:


    1B - ALTER TABLE NOLOGGING;

    2 - merger

    3 collect Forall with in bulk

    According to my understanding, the 1st point is more effective then others. Please correct me if you find me wrong

    Here is an example from the VLDB and partitioning Guide: https://docs.oracle.com/cd/E18283_01/server.112/e16541/parallel007.htm. But basically, you just have to add the PARALLEL and NOLOGGING keyword in CREATE TABLE. And make sure you change the logging mode again after the operation and get the object in your backup. https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:5280714813869.

  • Printing from multiple records data for a selected record

    Hello...

    I have a multi disk block. My client wants to print a report based on the
    record it selects / clicks.

    For example, if my employee block has 20 records and my customers click on 7th recording then
    Click the print than the specific details that should be included in the report.
    I want to know how to use the form for reports of this situation.

    Timely help is needed here...

    Thanks in advance...

    Hello

    The suggestion provided by Kame requires the user to enter the value of the DOC. In your case, you want the State to print according to the selected record by the user (which happens during execution).

    In order to achieve, you must write a trigger pre-requete and assign the empno value to a global variable and then pass this global as a parameter empno variable when we click on the button to run the report.

    Pré-requête

    : GLOBAL .empno: =: BLOCK. COLUMN;

    It will be useful.

  • Could re: Anyone tell me the release date for the Toshiba Tecra S10-106

    Could someone tell me the release date for the Toshiba Tecra S10-106. What would be the estimated price for this model.

    Thank you

    I already posted this in your other thread on Tecra A10.

    On the Europe of Toshiba page-> Products->-> Tecra laptops, you will find a whole list of different series and Tecra models.

    Right now I find only the info that these phones will be available soon.

    You may need to wait a bit...

  • I can't use the microphone in my headset for Skype and recording programs

    Hello...

    I can't use my microphone in my headset for Skype and recording programs.
    Can someone pls help? I tried the camera on my phone, it works perfectly.
    I use v8.00.03 (T) Edition Premiun.

    Post edited by: worldliner

    Sorry mate but could you be more specific?

    > I use v8.00.03 (T) Edition Premiun.
    What does that mean? Toshiba BT stack or what?

    There is a new BT stack:
    http://APS2.toshiba-tro.de/Bluetooth/?page=download-Toshiba
    Its v8.00.12

  • I often get frequent blue screens on internet sites. Blue screen too fast for me to record specific error message. How can I put an end to the blue screen to get the error message?

    frequent blue screens often to internet sites.  Blue screen too fast for me to record specific error message.  How can I put an end to the blue screen to get the error message?

    en blue screen too fast for me to record specific error message.  How can I put an end to the blue screen to get the error message?

    If your computer is restarted when the BSOD appears, then you must change the by default for what to do in case of system error. It is easy to do, but takes a lot of mouse clicks to get there:

    Start | Control Panel | System | Advanced system settings (need for credentials for the administrator to spend here |) Advanced | Startup and recovery / settings.

    On this screen, uncheck the box under system failure that says automatically restart. The next time the BSOD appears, your computer will not do anything else until you press the reset button, so you'll have all the time you need to read and copy the error codes. Paste here, verbatim, and someone should be able to point in the right direction.

    ``````~~~~`````

    In the control panel choose reports on problems and Solutions (problem of type in the START search box), go to historical problem, right-click your error and choose check for the Solution. You can also examine the details.

    In administrative tools, choose the reliability and performance monitor and click on MonitoringTools then the reliability monitor (type reliability in research on Start). This list is a chart of the software installs, uninstalls, updated Windows and crashes by date. See if your plant has started to happen after you installed or uninstalled something.

    It may be useful to eliminate equipment defects

    Type of memory in the search box of start and choose Memory diagnosis

    In a command prompt (type command in the start search box then right click and choose Run as administrator) type

    CHKDSK c: /r

    If you have more than one drive replace C: with the other drive letters.

    Search for corrupted files by typing at the command prompt

    sfc/scannow

    You can clean boot troubleshooting http://support.microsoft.com/kb/331796

  • It is a group policy setting that allows Silverlight store data for a roaming profile user limited account?

    We have customers that use our Silverlight application. Application off because errors that the software is not able to store data about user roaming profile folder. So far, developers have a setting which allows the application to be listened to, but that makes it real slow. We try to get out of that. So my question is there a group policy setting they are system administrator can setup to allow Silverlight to store data for a roaming profile user limited account? Maybe allow data to be written locally only to the specific folder that requires Silverlight?

    Thank you!
    Carlos.

    Hi Carlos,

    ·         Are these computers on the domain?

    If the computers are on the field then I suggest you to ask your question on the Microsoft TechNet Forums.

    Windows XP IT Pro category

    If this isn't the case, you can post your question on the forums of Microsoft SilverLight.

  • Release date for the RE7000 in Europe?

    Hello

    Quick question, no release date for the RE7000?

    http://www.Linksys.com/us/p/P-RE7000/

    Already register when available

    Thanks for your time,

    Hello. We do not yet have an official release date. We will post updates on our Web sites.

  • HOW TO SET THE TIME AND DATE FOR MALAGA SPAIN 29130

    TIME AND DATE FOR MALAGA SPAIN

    Hi Colin,

    Thanks for posting your query in Microsoft Community.

    • Are you referring to a zip code when you say 29130?

    I would refer to the procedure described in the article below to set the date and time in Windows 7.

    Change the display of dates, times, currencies, and measures

    You can also view: set the clock

    Hope this information is useful. Please feel free to answer in the case where you are facing in the future other problems with Windows.

  • What is the best software for music games record set?

    Hey guys, I want to post YouTube videos of the game I called: DJ Max Trilogy. It's a game of Korean music, but I can't find a good recording game software that does not make my game lag. I tried several software that record the games without lag; that was true, but lag during gameplay experience but when the result of the video I recorded, there is no lag involved. His strong play a music game where the gameplay experience is trolling, then the result is smooth... Can anyone offer any good recording software game that might help?

    Hello

    Unfortunately, Microsoft does not have any recording of game software. You can use your favorite search engine to search for the game recording software that you think is the best for you.

    Note:

    With the help of third-party software or a link, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third party software or link can be resolved. Using third-party software or a link is at your own risk.

  • Launch date for Cisco switches

    Hello

    I need the launch date for the following products:

    Cisco SB SG200

    Cisco SG300 SB

    Can anyone provide this information?

    Thank you

    Tiziana

    Wrong forum, post in "small business switches. You can move your ad with the Actions Panel on the right.
  • Are there any restrictions for custom object records?

    Hello

    Are there any restrictions for custom object records?

    Thank you

    Hello

    Registration of custom object data cannot be used:

    • with Hypersite field mergers;
    • with the research data on the data in the field, only the number of overall;
    • on off key Dynamic Content in the emails

    edynamic expert Eloqua

  • Best way to remove millions of records


    Hi gurus

    Just for my goal of learning, which should be the best way to remove records from the entire table containing millions of records, I know about truncate command, but is there any other way around?

    Concerning

    Muzz

    Hello

    If you want to remove all the lines, then nothing can TRUNCATE TABLE for performance.  You cannot RESTORE a DML, as TRUNCATE TABLE operation, that's why it's so fast: he doesn't have to remember what has been deleted.  TRUNCATE TABLE will leave privileges, constraints, triggers, and intact the table storage parameters.

  • How to get data for submission of form using REST or SOAP API

    Hello

    Can someone let me know how to recover data using REST or SOAP API for example, also I need to know how to delete some data from form submission using REST or SOAP API for submission of form. Answer please I need to implement in one of my projects.

    Thanks and greetings

    Angela

    Post edited by: Md Shahid

    Here the answer How to recover data for submission of form using REST or SOAP API

  • Sum on multi block record for only displayed records

    Dear all,

    I've been invited below question on interview session and I really do not come upwards with a logic to accomplish.

    In a multi record block, not the displayed items property has the value 10. In this block, an element is placed named current_rate (Number data type).

    While the form is running, it will display 10 records, and I need to display the sum of the current_rate for these 10 records. When I scroll to display multiple records, this amount must also be changed based on the record number of display. Is it possible to make forms to operate this way?

    Please advice.

    Thank you and best regards,

    The roots.

    Another way - create element (e.g. "sum") in a block of control (for example, "cb") and write this:

    -Prior REQUEST for the block of data (for example "E1")

    : cb.sum: = 0;

    -After REQUEST for the block of data (for example "E1")

    : cb.sum: =: cb.sum +: emp1.salary;

    Query the property size array in a data block (specifies the maximum number of records Form Builder to retrieve from the database at the same time)

    must be 0 (default = the number of records can display the block, as indicated by the property of block number of records displayed).

    Concerning

Maybe you are looking for

  • OSX installer

    I want to create a bootable Installer for OS Yosemite. Reason being, I want to install a new SSD for my 2009 macbook pro. Mac support saids to download the OS X from mac app store? I can not find? also where is the creatinstallmedia in the terminal?

  • Satellite A200/A205 - problems with start-up and sleep modus

    I have a problem with my Toshiba (running on Windows Vista). When I start the computer, sometimes it starts normally. But often, it starts to beep, I can hear the fan start fan and lights up blue. But the system unbootable and I see only a black scre

  • Table of index always returns zero when reading the table 3D

    I have a 9 x 2000 x 5 table table 3D diamension.  I have this table filled with data and when I try to read a data point unique on the table the function Index Array always reads zero. I place a probe on the 3D input array and when I put in the index

  • How to use the function keys F1 to F12 without presseing Fn key

    I use pavalian dm1 netbook. I have to press the "fn" use F1 to F12 keys. How to change?

  • File downloads - how to remove several unwanted files?

    I have stupidly amassed 429 points, some I want to keep, and one load I want to erase. Having this 429, a back up takes more time to do. Please, what is the best way to untangle this mess. Thank you. Nicholas Barnard 31.12.2014