Little problem with SQLLDR

Hi,
I've got great help here in the past so I thought this would be the right place to try and find the solution to my problem loading data using SQLLDR into an oracle database.
Basically, upon loading I am using a to_date function. However, the parameters this to_date function must take depends on the data I'm trying to load (there are only two possible date formats I'm trying to load). Is there any way of using two to_date functions inside a conditional statement (if statement etc.).
Thanks a lot in advance!!
Dan

Looking at what you posted, i think you may have some issues with the quoting.
to_date(:DATE_FIELD,''DD-MM-YYYY'))"
{code}
You have a double quote before the DD there.
Edited by: Tubby on Jun 14, 2010 10:10 AM
I see someone else is quicker than me :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Problem with sqlldr and commit

    Hi,
    i have a problem with sqlldr and commit.
    I have a simple table with one colum [ col_id number(6) not null ]. The column "col_id" is primary key in the table. I have one file with 100.000 records ( number from 0 to 99.999 ).
    I want load the file in the table with sqlldr ( sql*loader ) but i want commit only if all records are loaded. If one record is discarded i want discarded all record of file.
    The proble is that in coventional path the commit is on 64 row but if i want the same records of file isn't possible and in direct path sqlldr disable primary key :(
    There are a solutions?
    Thanks
    I'm for the bad English

    This is my table:
    DROP TABLE TEST_SQLLOADER;
    CREATE TABLE TEST_SQLLOADER
    (     COL_ID NUMBER NOT NULL,
         CONSTRAINT TEST_SQLLOADER_PK PRIMARY KEY (COL_ID)
    This is my ctlfile ( test_sql_loader.ctl )
    OPTIONS
    DIRECT=false
    ,DISCARDMAX=1
    ,ERRORS=0
    ,ROWS=100000
    load data
    infile './test_sql_loader.csv'
    append
    into table TEST_SQLLOADER
    fields terminated by "," optionally enclosed by '"'
    ( col_id )
    test_sql_loader.csv
    0
    1
    2
    3
    99999
    i run sqlloader
    sqlldr xxx/yyy@orcl control=test_sql_loader.ctl log=test_sql_loader.log
    output on the screen
    Commit point reached - logical record count 92256
    Commit point reached - logical record count 93248
    Commit point reached - logical record count 94240
    Commit point reached - logical record count 95232
    Commit point reached - logical record count 96224
    Commit point reached - logical record count 97216
    Commit point reached - logical record count 98208
    Commit point reached - logical record count 99200
    Commit point reached - logical record count 100000
    Logfile
    SQL*Loader: Release 11.2.0.1.0 - Production on Sat Oct 3 14:50:17 2009
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Control File: test_sql_loader.ctl
    Data File: ./test_sql_loader.csv
    Bad File: test_sql_loader.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 0
    Bind array: 100000 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table TEST_SQLLOADER, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    COL_ID FIRST * , O(") CHARACTER
    value used for ROWS parameter changed from 100000 to 992
    Table TEST_SQLLOADER:
    100000 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 255936 bytes(992 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 100000
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Sat Oct 03 14:50:17 2009
    Run ended on Sat Oct 03 14:50:18 2009
    Elapsed time was: 00:00:01.09
    CPU time was: 00:00:00.06
    The commit is on 992 row
    if i have error on 993 record i have commit on first 992 row :(
    Edited by: inter1908 on 3-ott-2009 15.00

  • Little problem with Photoshop ....

    Hi. I have a little problem with photoshop CS 4. I use a color replacement tool to change a color in some details... but when i set new color, on pictures entries only or grey or black colors and nothing other... i dont known why.... please help . Thanks. Sorry for bad english

    Usually the Color mode is the one you want for the color replacement tool, you
    might have it set to luminosity or your trying replace black or white colors.
    MTSTUNER

  • Little problem with Strings.

              I have an little problem with Strings, i make one comparision like this.
              String nombre="Javier";
              if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
              Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
              this before and are equals.
              What I do wrong?.
              

    You are actually making your users key in things like
    "\026"? Not very user-friendly, I would say. But
    assuming that is the best way for you to get your
    input, or if it's just you doing the input, the way to
    change that 4-character string into the single
    character that Java represents by '\026', you would
    use a bit of code like this:char encoded =
    (char)Integer.parseInt(substring(inputString, 1),
    16);
    DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
    System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :)

  • Little Problem with Photoshop CS3

    Hi, I have a little problem with Photoshop CS3, I'm not sure if this's because a Windows option that I messed up, but the thing is that I didn't touch any options, or some kind of preferences.
    I'm talking about the "little windows" (I don't know the correct name) that come from, in this case, the Filter and Analysis options, they're coming down from their right side, and usually, the come down from their left side. This is really annoying.
    Not big deal, but I can't really work properly. I hope you guys can help me, and this's my first post, I hope I didn't break any rule.

    Thanks Mylenium, that was the problem, I don't even have a tablet, but that fixed my problem =)
    Thanks again.

  • Hello, I have a little problem with my ipod (3rd generation): I restored my iPod because of problems of wi-fi, then synced my music on itunes and then on my ipod. The problem is that I still do not have wi-fi and my ipod says I have no music. Help me!

    Hello, I have a little problem with my ipod (3rd generation): I restored my iPod because of problems of wi-fi, then synced my music on itunes and then on my ipod. The problem is that I still do not have wi-fi and my ipod says I have no music. Help me!

    No. In fact, my ipod detects the livebox and the network but I can not connect to the internet.

  • A little problem with color profiles

    I am trying LR and so far I love it, it has successfully replaced RSP for me, and also beat Bibble which I briefly considered but didn't like due to the weird UI.
    However, I have a little problem with colours, which has never happened so far with other converters, and I am hoping you can help me to solve it.
    My monitor is calibrated with the Spyder and the appropriate profile loaded in the video card.
    When I work on a RAW image in LR, and then export a sRGB JPG, and then open it with a browser, or the Win viewer, I see it redder. If I open the image in Faststone, I see it almost sepia.
    If I export a TIFF and open it in PS, I see it as in LR, but when I export a JPG from PS (this is my typical workflow), the resulting image has the same problem.
    Considering that my entire workflow is in sRGB, can anybody coach me as to the correct settings I must use in order to obtain a final sRGB image with the same colors as in LR? I think that I must be doing something wrong, as the program behaves consistently with PS.
    Thank you in advance for any help you will be able to provide.
    Andrea,
    from Italy

    Funny how it's only Windows users that have this 'problem'.
    This is not a 'problem' at all. The only 'problem' here is that you've been used to using non-color-managed applications. Suddenly, Lightroom comes in as a mature, color-managed, program... and you're all going bonkers.
    Mac users aren't going bonkers because we're used to using color-managed applications (Preview, Safari, etc. are all color-managed on a Mac).
    Let me clarify for you that by 'color-managed', I mean that the software is *not only* reading the embedded profile in your image, but is *also* converting, on-the-fly, the RGB values of that image to a new set of RGB values that compensates for the native response of your monitor. Say, for example, your monitor only displays a narrow gamut of reds. Chances are, then, that LR or PS will intelligently compensate for this by saturating reds before sending to your monitor. This is how color management works. You can now imagine the disastrous effects that a bad/inaccurate monitor profile might have...
    Your Windows applications, such as 'Viewer', use the Microsoft ICM 2.0 API. This *will* read the embedded profile in an image, but instead of converting to your monitor profile for output, will simply convert to sRGB. That's basically like half-a$$ color-management. Read more about it here:
    http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/prork/prdn_img_vkev.ms px?mfr=true
    Firefox & IE don't even use the ICM 2.9 API, making them entirely non-color-managed. Whatever the raw RGB values are in your image, these applications spit out at your monitor.
    It's very important you understand these simple concepts before proceeding any further.
    OK, ready?
    The original monitor profile that came with my MacBook Pro (profiled by someone over at Apple generically for all MacBook Pro LCDs, I guess) really seems to have underestimated the gamut of my monitor. Hence, color-managed applications compensated for this be resaturating my images (especially in the oranges/reds) before outputting to monitor. Therefore, images looked really nice and saturated in color-managed applications; however, when I exported them to sRGB JPEGs and then uploaded to the web, they looked desaturated (in Firefox, NOT in Safari, since Safari is color managed). They even looked desaturated on other people's monitors (these 'other people' were your average Joes...).
    I then profiled my monitor using an i1 colorimeter. A 3-D plot of my monitor profile now showed that it actually had a much larger gamut than what Apple had predicted in their profile (but this gamut was still much smaller than sRGB, or the gamut of my Dell LCD or Sony CRT, etc.). Therefore, now, LR and PS, using this new profile, showed images much less saturated. Now when I made my edits, and then exported to sRGB JPEGs, images looked slightly *more* saturated in non-color-managed applications and on other people's computers.
    So, you see, your monitor profile affects how you make adjustments/edits in color-managed programs. If your hardware profiler profiled your monitor incorrectly (which I assume is the problem here), then you may be over-saturating certain colors within LR, skewing those RGB values so that a non-color-managed program, which will not re-correct these values as LR is doing, will display the image with too much, say, red.
    Bad monitor profiling also explains why you see this problem only on certain images/colors... if it were a LR problem, you'd most likely see it on every export. The color variance is more than likely due to a bad monitor profile that is not accurately describing your monitor's native response... hence LR/PS are incorrectly adjusting your images before sending to the monitor.
    And at this point, please don't resort to saying "but the colors in the web browser look 'right' and LR looks 'wrong'". This statement has no meaning, as what looks 'right' to you in your web browser might look horrible to someone else with a different monitor. The point of color-management is to minimize these differences. For example, I was very unhappy by how desaturated my images looked on the web compared to in PS before I calibrated my monitor. Now, images look slightly *more* saturated on the web than in LR/PS, which I'm OK with. *Should* they look the same? Heck no. Similar? Yes. Is it better if they do look the same after hardware profiling? Yes, if your main goal is web export, but, keep in mind, the only way they *would* look the same after PROPER hardware profiling would be if your monitor happened to have a very sRGB-like response (to explain this would take another few paragraphs... but you should be able to figure it out if you ponder a bit).
    I hope this is making sense. Let me ask you a couple questions now:
    1.) For your headshot image, IMG_8860, which colors look 'right' to you -- the colors in LR, or the colors upon export (i.e. the headshot on the left or the right in your link above)?
    2.) How exactly did your profile your monitor? Was it in the dark? I had quite a bit of variance in my monitor profile depending on whether or not the Mac OS X dock was visible at the bottom of the screen -- the light from the dock leaked into the colorimeter which then led to profiles that generated yellow/green color casts.
    -Rishi

  • Urgent Little Problem with JApplet

    Hi, i have a little problem, i have an applet that loads on a webpage
    it contains two textFields and a command button , i want when i click
    on the button i should open a new page with the values in the two TextFields.
    Thanks.

    Use getAppletContext().showDocument(URL url).
    ================================
    Sincerely,
    Melnikov V
    AlarIT programmer
    http://www.AlarIT.com
    ================================

  • A stupid little problem with FORTE

    Hi to everyone,
    I'm using FORTE on windows 2000 but I've a little problem: I can't put the characters {} in the source editor.
    I've tried with the ASCII code (ALT + 123) and with ALTGR+7 but they don't work. How ca I do?
    Thanks

    You can copy the them from where you are able to type them, and then paste them in the editor with ctrl+v. To copy, you can use ctrl+c.

  • I have a little problem with input in my program...(System.in, BufferedRead

    I'm coding a program that takes a input like this :
    Sample Input
    1 11 5
    2 6 7
    3 13 9
    12 7 16
    14 3 25
    19 18 22
    23 13 29
    24 4 28
    So I wrote a code like this :
    public static void main(String[] args) throws Exception{
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              String input = null;
                   while((input = br.readLine()) != null) {
                   StringTokenizer st = new StringTokenizer(input);
                   int leftX = Integer.parseInt(st.nextToken());
                   int height = Integer.parseInt(st .nextToken());
                   int rightX = Integer.parseInt(st.nextToken());
    .... rest of the code....
    But unlike I expected, the program did not pass the while loop.
    When I observed in debugging mode, when "br.readLine()" has no more strings to read,
    the whole program just becomes idle doing nothing, and it does not proceed further.
    Is there any problem with my code there? I've been trying to figure it out for hours... Please help!!!

    myunghajang wrote:
    Why doesn't it work in a way I intended? BufferedReader returns null if there is no more string to read, and what's the problem?
    It's so frustrating...The computer doesn't have a mind reading input, how is your program supposed to know you have finished typing the input?
    If you put the data in a file and redirect it into your program on the command line it will work (because the file knows where its end is)
    Your program could instead assume that a blank line is you end of input.

  • Having a little problem with iPhone 3G.

    Hi!
    I have problem with Iphone 3G 16 GB. I was trying to reset all the settings in the iphone but something went to wrong side and now probably operating system is damaged and only icon for connection to the iTunes is showing up. ITunes is not recognizing the phone. Please can you help me!
    Thanks in advance.

    Hey gonche,
    The iPhone is in Recovery Mode, generally the iPhone will have to be restored to get it out of recovery mode.
    This article: http://docs.info.apple.com/article.html?artnum=305744 will walk you through restoring the iPhone.
    -Jason

  • Little problem with rename view

    Hej, I've been having a problem an small problem with this... so far i'm changing the position of the tree of and Active Directory account... the major problem is that if i move this account 3 times the accountId fot that resurce is still the original one.
    <set name='newViews.newAccountId'>
                    <ref>myIdentity</ref>
                  </set> 
                  <set name='newViews.accounts[AD].newAccountId'>
                    <ref>myIdentity</ref>
                  </set>
                  <set name='newViews.resourceAccounts.selectAll'>
                    <s>false</s>
                  </set>
                  <set name='newViews.accounts[AD].identity'>
                    <ref>myIdentity</ref>
                  </set>
                  <set name='newViews.accounts[AD].newAccountId'>
                    <ref>myIdentity</ref>
                  </set>
                  <set name='newViews.resourceAccounts.currentResourceAccounts[AD].identity'>
                    <ref>myIdentity</ref>
                  </set>
                  <set name='newViews.resourceAccounts.currentResourceAccounts[AD].selected'>
                    <s>true</s>
                  </set>
                  <set name='newViews.resourceAccounts.currentResourceAccounts[Lighthouse].selected'>
                    <s>false</s>
                  </set>myIdentity is the new value for the account basically cn=..,ou=.. etc.. and all works fine but the first given accountId when the account is created always remains and is never changed during the rename action....

    Hi,
    I had the same problem. The move operation in AD functioned perfectly but the displayed account information kept showing the old DN. The problem was, I had the move activity inserted in the update user workflow BEFORE the Provision activity. I moved my custom rename activity to AFTER Provision (and right before notification) and now the new DN is showing on the account information screen. It appears that if you do the rename before provision, the old information will overwrite the new stuff. But if you do it after provision the new stuff will overwrite the old stuff.
    I hope this helps :-)

  • I have a little problem with iphoto

    Hi, i have a little problem when i used my iphoto.
    First, i'm so sorry because my english is not fluent, but i hope that you understand me.
    The problem is that, i can't see the photos when they are vertical, i mean, when i change my photos horizontal view to vertical view, i can't see the vertical photos.
    Can you help me??? i dont understand what is the problem.
    Thanks so much.
    Lorena from Colombia

    Try rebuild the library:
    Hold down the apple and option (or alt) keys and launch iPhoto. Use the resulting dialogue to rebuild.
    Regards
    TD

  • I have a little problem with recursion.

    I have a HashMap, and I've written a method to fill it up recursively. The map size is 20.
    void fillMap(HashMap map)
    if(map.size()==20)
       return;
    //Code to fill up map
    System.out.println("Map size = " + map.size() );
    fillMap();
    }Output is like:
    Map size = 1
    Map size = 2
    Map size = 3
    Map size = 19
    Map size = 20
    Map size = 1
    Map size = 2
    and so on.
    Is there a problem with doing: if(map.size()==20)
       return;?

    yeah that was a typo.. my actual code seems to be fine that way.
    And it wouldn't compile unless I had a fillMap(*no value*) method either, right?
    I still don't get what is wrong. Here's some new code
    public class CustomMap extends HashMap
         public CustomMap()
              super(new HashMap(20));
              fillMe();
         private void fillMe()
              Object key;
              Object value;
                    if(size() == 20)
                   return;
              //--bunch of code here to determine the key and value
                    //-- I have it so no key and no value are the same, by the way
              put(key, value);
              System.out.println("Size: " + size());
              fillMe();
    }

  • Little probleme with UIScrollBar

    Hi,
    Im having a problem with my UIScrollBar.,
    I have a dynamic text field "My_text" in the scene.  the text is aplied to it  dynamicly    like this: My_text=String(theVarText). The text appear but the scroll dont scroll. but if i set the text in the textfield in the actual FLA and export the movie, the scroll works, Can someone tel me WHY ??

    When you write to a textfield that has a scrollbar assigned to it, you need to refresh the scrollbar if you change/add text after the file is playing.  I don't have the help documents available at the moment, but if you should be able to look thru the UIScrollbar methods and find the method that is used for this... possibly reset() or refresh() or update().  So once you write to the textfield, use that command to make the scrollbar readjust to the new next situation.

Maybe you are looking for

  • Can anyone help read my etrecheck report cos mbpro 2010 yosemite is hurtin!

    I know my battery is just about toast but I am running 8gb of ram and a samsung 840 pro SSD and it looks like I am down at the seashore - there are beachballs everywhere! My finder locks up, sometimes it wont even let me empty my trash. I installed t

  • How to make the length of Message Dialog follows the length of text

    Hi all. I am making a Message Dialog From JOptionPane because i do not want to use some static methods of JOptionPane (JOptionPane.Show ...) My source codes following : public static void showMessageDialog(String message) {           JOptionPane opti

  • JavaScript not enabled?

    I am not a tech moron, but I have totally hit a wall with this (hopefully) small browsing problem. Every site that requires Java ceases to access the script. Therefore, I have no access to these sites. I have tried to reinstall the Java console, fina

  • Flash cc Crashes when testing project

    i have been working on an app for some time now it has been working fine and i had no problems with it until i got my new computer i installed the trial of flash cc and opened my project in it, re set the path for some of the files and tried to test

  • My ITunes Store is showing up blank.

         Hello.      Recently my ITunes store hasn't been working. I'd click on the icon and my Library is working just fine. Same for music and apps that I already have. And also for my Ipod Touch. But when I click to go to the Store, it will show the I