Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: date mask in SQL*Loader

Re: date mask in SQL*Loader

From: Patrice Borne <patborne_at_gmail.com>
Date: 9 Feb 2007 11:52:02 -0800
Message-ID: <1171050722.327888.128630@m58g2000cwm.googlegroups.com>


On Feb 9, 8:38 am, DA Morgan <damor..._at_psoug.org> wrote:
> web guy wrote:
> > I'm using SQL*Loader with a delimited file from Excel. I have a date
> > field that the users are 'supposed' to populate with a format of
> > 'mmddyyyy', and I simply do a to_date(:date_field,'MMDDRRRR') in the lod
> > script and all is well.
>
> > However, very often I get dates in the file with a format of 'M/D/YYYY'
> > or 'MM/DD/YYYY', and rather then reject that record during load, I would
> > of course like to load it anyway.
>
> > Any suggestions on how to do this?
>
> > Tim
>
> Define a discard file and send those records back to be fixing.
>
> Covering for other people's inadequacies is a recipe for working
> evenings and weekends. And no one will remember you did it three
> weeks later except to expect you to do it yet again.
> --
> Daniel A. Morgan
> University of Washington
> damor..._at_x.washington.edu
> (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org

I agree 100% with Daniel. The best approach is to simply let those records be rejected and send them back to the senders, asking them to fix THEIR process. Otherwise, you are basically offering yourself as an easy scapegoat when something explodes in the future. Today, you know what the problem is and you know how to fix it. Tomorrow, someone will create another problem in the data (since they won't care because you will be responsible for problems, not them) and will not have anticipated it. Believe me, I have played this sort of game for a long time.

Define a format that the data MUST adhere to and simply return to the sender data that doesn't comply. Remember, when something craps out that impacts the business directly, upper management will ask for a name to blame and you will be sacrificed because "you did not load the data correctly". Nobody will listen to your technical arguments, believe me! Received on Fri Feb 09 2007 - 13:52:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US