When inserting to reject incorrect records

Hello

I have a SQL query like
insert into table1 select * from table2
Table 2 has now some incorrect records. It; s a field table and the date of stage inside is VARCHAR2 format. And for little it records not in the right format. Then, when insert into table1 and making to_date it throws error.

Error number: ORA-01878

So now, I want to reject these recordings and insert the rest of the records. Please guide how this can be achieved.
select * from v$version
where banner like 'Oracle%';

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
Thank you and best regards,
Mr. lonely

Published by: Mr lone on April 10, 2013 10:35 - added Version
CREATE OR REPLACE FUNCTION checkDate(d VARCHAR2) RETURN DATE DETERMINISTIC IS
BEGIN
  RETURN to_date(d,'dd.mm.yyyy');
EXCEPTION
  WHEN OTHERS THEN RETURN NULL;
END;
WITH t(d) AS
(
  SELECT '01.01.2013' FROM dual UNION ALL
  SELECT '04.04.2013' FROM dual UNION ALL
  SELECT '.2013' FROM dual UNION ALL
  SELECT '09.04.2013' FROM dual UNION ALL
  SELECT '01.asdasdasdsad' FROM dual
)
SELECT checkDate(d)  FROM t
WHERE checkDate(d) IS NOT NULL

Published by: Ramin Hashimzadeh on 10 April 2013 09:59

Tags: Database

Similar Questions

  • Registration in PDF format makes black text appear when inserted images

    Hello! Please if someone could help with my bug. I use InDesign CS 5.5 now, but the same thing also happens when I try to save a Word document as a PDF (MS Word 2010).

    This only happens when I insert images into a page. Record in PDF format, black text appear when inserted images. Please see the pictures attached the text normal and abnormal in the case of an inserted picture. I also installed Acrobat X Pro. I have no printer connected to my PC.

    Please if someone could tell me how to fix this bug?

    Thank you very much in advance!

    text.png

    PNG should work fine (even if it is not designed as a print size). If is not the image in question format (thought jpeg does not support transparency in the image itself), jut the fact that there is a form any transparency on the page.

  • Loading of SQL * Loader incorrect records in table

    I m using 10g. I create my SQL * the charger on the fly control file. After the execution of the control file, some incorrect records are created. I need to insert these incorrect records in another table. A column of the table will have the wrong record [LONG data type] and the other will be the file name. This is possible thanks to the logging of DML errors or the external table. I have several bad files.

    Hello

    OP wants to load some generated off sqlldr badfile records and where these data will be loaded should not have more than 3 columns (so is the control file) that I posted in my post back and it works like a charm :) (tested and current usage).
    Concerning

  • Re: DVD of the (optical) drive cannot read a disc when inserted.

    Hello everyone.

    MY DVD drive can not read a disc when inserted.

    When I check the Device Manager, it has the following against the optical drive error message:

    "Windows cannot start this hardware device because its information of configuration (in the registry) is incomplete or damaged. (Code 19) »

    How can I solve this problem and fix it for free if possible? Download a patch from the website of toshiba?

    Your help is greatly appreciated.

    Mark

    See also http://support.microsoft.com/kb/314060/en-us and post comments.

  • C50-B-15Z satellite does not recognize discs when inserted

    Toshiba Satellite C50-B-15Z
    Hello! Pls my Satellite C50-B-15Z newly purchased does not recognize discs when inserted. It dosent play any CD or DVD drive, or it even recognize it at all. Pls help... What should I do?

    Original Win8.1 is installed on your machine?
    Have you tested the feature with different CD and DVD, DVD (original)?

  • Satellite P875 - 31 c - BSOD when inserting the SD card

    Hi all and sorry for my English.

    I have a problem when insert a SD card into the slot. If displays a blue screen with the missage follow:
    "PAGE_FAULT_IN_NONPAGED_AREA" your Pc we will be verified and then restarted itself.

    My laptop is only 3 months old and today is the first time I try to insert the SD card into the slot.

    Everyone knows what can be the problem?
    I just downloaded and installed the drivers from the official page, but no good result.

    Thank you very much

    Sergi.

    Hmm... What SD card insert you?
    According to the specifications for portable computer page, the device supports the SD card up to 2 GB, miniSD/microSD Card with adapter up to 2 GB, SDHC up to 32 GB card, MultiMedia Card up to 2 GB and up to 64 GB SDXC card

  • How to choose a program to open my photos when inserting my SD card? as it doesn't give me options of this program to use differently than before, why, I don't know, so any help would be appreciated.

    How to choose a program to open my photos when inserting my SD card because it does not give me options of this program to use differently than before, why, I don't know, so any help would be appreciated.

    I know what it is, and I'm trying to answer it... will keep you posted
    your original question in a forum of Vista.

    OK... you are running XP and your computer has a media player you
    Insert the card in?

    If you go to... Start / my computer... There should be one or more readers
    listed as... Removable Disk... These are the slots of the media player.

    If you right click on the removable disk representative the memory card
    and in the menu... Choose... Properties / Autoplay tab and open the fall
    window and select pictures. And... ICT... "ask me each time to choose
    an action "." Maybe this will restore the AutoPlay window when you insert
    the map.

    You could also try... on the left by clicking on the button "Restore default settings" / apply / OK.

    And it may be worth trying to run the AutoPlay Repair Wizard.

    Download the Microsoft Autoplay Repair Wizard:
    http://www.Microsoft.com/download/en/details.aspx?displaylang=en&ID=2648

  • have windows vista and it does not recognize a blank cd - r when inserted

    I have windows vista and it does not recognize a blank cd - r when inserted. I think that it is the drive d. I then put a cd - r with music on it and it does not even recognize them. When I put a game disc in there he reads very well. What is the problem?

    Hello

    Thank you for writing to Microsoft Communities. From your problem description, I understand that you are unable to read CD - r discs on the computer. Please correct me if I misunderstood.

    1. What is the brand and model of the DVD player?

    2. you get any error message?

    3 have there been recent changes to the computer before the show?

    Please go ahead and follow the steps mentioned below and later a update on the State of the question.

    Method 1: Your CD or DVD drive cannot read or write media

    http://support.Microsoft.com/mats/cd_dvd_drive_problems/en-us

    Method 2: Your CD or DVD drive is missing or is not recognized by Windows or other programs:

    http://support.Microsoft.com/kb/314060

    Please follow these recommended steps and post if you still experience the problem.

  • I get a message "an audio recording device is not found" when I opened the tape recorder.

    When I go to sounds-> recording, microphone appears as "Not Plugged In". It wasn't so previously, and the problem comes after I reinstalled Vista on my DELL laptop. Kindly help... I'm not as able to use the microphone on Skype.

    Hello
     
    Welcome to the Microsoft Windows Vista newsgroups!

    Your sound card drivers are up to date?

    Check your recording settings by clicking on the speaker icon in the system tray and selecting recording devices.

    We can't wait to hear back on your part.

    Kind regards

    Savan - Microsoft technical support.

  • Windows Media Center can't find DVD disc when inserted.

    Original title: dvd player

    Windows 7

    Media Center can't find DVD disc when inserted

    shows driver to be good and up-to-date

    Play any CD or DVD or recognized by the system?

    DVD players are a common failure point in computers.

    If yours is a desktop PC:

    A replacement can be purchased for about $20 and is easy to install.  Remove all power.  Button Hold ON in during 7 seconds.  Open the case.  2 screws hold the disc instead of delete, then remove the two wires from the back.  Make slide the other in its place and reverse the procedure.

    If yours is the laptop:

    It is part of the OEM.  Therefore, it is much more expensive.  Probably in the vicinity of $100.  You can instead buy an external DVD drive for about $25, which is connected by USB.  It has the advantage of being portable and universally adaptable to any other PC.

  • My laptop (Windows 7) doesn't recognize CD or DVD when inserted in the drive.

    Original title: CDs? DVD not recognized

    My laptop (Windows 7) doesn't recognize CD or DVD when inserted in the drive.  No error message does nothing! ???

    Sorry my bad https://support.microsoft.com/en-gb/mats/cd_dvd_drive_problems/en-us , Ric (I've corrected the link as well)

  • I can't open my camera of withdrawal because it asks to format when inserted, but when format us windows says it can't complete the format

    I can't open my camera of withdrawal because it asks to format when inserted, but when format us windows says it can't complete the format

    This problem is usually caused by

    1. problem with the connecting cable
    2. the problem with USB port
    3. problem with the device itself.
    I suggest you try changing ports and cable. If this does not work, the problem is with the device only.
    In addition, note that the option to remove is not necessary to be used if you use Windows XP or a higher version of Windows and the device has an indicator of activity.
    As you can see, most USB storage devices are configured for the fast-moving, which means, no need to use the option remove safely. If you are sure of a use, for example, a file transfer operation is complete, you can remove the device directly.
  • CD/DVD does not auto play when inserted in the drive

    original title: AutoPlay does not work

    no media auto play when inserted in any drive.

    no media auto play when inserted in any drive.

    =========================================================
    Perhaps the following goods range offers a few ideas:

    Windows 7: Troubleshoot AutoPlay
    http://Windows.Microsoft.com/en-us/Windows7/Troubleshoot-AutoPlay-problems

    Windows 7 - change settings for importing pictures and videos
    http://Windows.Microsoft.com/en-us/Windows7/change-settings-for-importing-pictures-and-videos

    Windows 7: AutoPlay: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/AutoPlay-frequently-asked-questions

    How to set up the automatic run settings in Windows 7
    http://www.techtalkz.com/Windows-7/516004-how-configure-AutoPlay-settings-Windows-7-a.html

  • When inserting the data for ORA-00600.

    Hello

    I am inserting a lot of record in a table, while inserting some records I give below error.

    Error in the command line: 54 column: 1

    Error report:

    [SQL error: ORA-00600: internal error code, arguments: [ktbesc_plugged], [], [], [], [], [], [], [], [], [], []]

    00600 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s] '.

    * Cause: It's the generic internal error for Oracle program number

    exceptions.    This indicates that a process has encountered a

    Exceptional condition.

    * Action: Report as a bug - the first argument is the internal error number

    Above the error only comes for some records only. But works fine for other records.

    Hi Sher,

    Thanks for your reply, maybe this would help.

    I have question regarding ORA-0600, is it possible that this error occur for some selected only all time record.

    I tried 10 to 15 times. For some selected only records, this error occurs every time. If I jump records, it works fine.

    So is it possible that the error ORA-0600 occur that for some files only.

  • CC 2015 Dreamweaver crashing when inserting an image

    After the update of November, opening some files causes Dreamweaver cc 2015 planting.

    has decided to create a new html file but now Dreamweaver freezes when inserting a picture.

    Someone knows how to solve this problem, I have a-installed and re-installed and it is always to have the same effect

    I can insert the image of the local site (let's call it A) to files within a different local site and no crash occurs,.

    but try to insert the image of A site, and BOOM Dreamweaver stops.

    Inserting images to other local sites work well, but also try to insert images of his own image folder causes problems

    Nancy O. says:

    When DW starts acting weird, the first thing to try is delete the Cache of corrupt in DW

    http://forums.Adobe.com/thread/494811

    If this does not help, try to restore preferences

    https://helpx.Adobe.com/Dreamweaver/KB/restore-preferences-Dreamweaver-CS6-cc.html

    Nancy O.

    Thank you Nancy O, just tried that, but it did not work.

    I think it has to do with the images and how Dreamweaver sees them.

    I have just re-exported images JPEG in Photoshop and they work fine.

    The images were created just before the last update CC causing the problem.

Maybe you are looking for

  • Headset Bluetooth and Apple Watch experience

    I considered a Apple Watch, and just now, I realized that it was possible to pair headphones with the watch directly.  I have a 6 s + in a case, and it is quite bulky.  Great for travel and places, but around the House or in the office, it would be a

  • New private window does not open

    I've updated my browser Firefox yesterday. Not problems after that. Close my laptop. Rebooted the laptop today. Firefox has started which opened after a long delay. "Clicks on the icon to open ' new private window. He has not opened even after severa

  • On Satellite L500 power jack replacement

    Hello I have laptop Toshiba Satellite L500-11Vpart no: PSLJOE-OOROOJEN The power Jack is broken. I do not weld. If I buy the power supply with cable can be installed in this laptop as the seller has mentioned that the welding is not necessary. Thank

  • RN v1 duo set for Time Machine and after a clean install of Yosemite I can't access my data

    Hi guys,. I have the ReadyNas duo v1 set for Time Machine and after a clean install of Yosemite I can't access my data. When I try via the Finder, files look for empty to me while info shows that they are not. I have no more support and I tried every

  • Create .exe for two screws

    Hi everyone, I tried to understand how the do, I have 2 screws, but Firestone is LOGIN, and if this connection is correct, then open another VI called TESISFINAL, I don't know if it will work ok it done that way. Or what I need to do to create an exe