SQL*Loader and using nulls, truncate and sysdate.

Good afternoon,
I have a control file some of which is below which I need to use to load a CSV file. What I want to know is; how do I truncate fields which are too long and if there is no date specified how do I insert the sysdate as default. For any other fields missing data I want to insert a NULL value, I think that I have the NULL bit sorted.
LOAD DATA
INFILE new_employee.csv
INTO TABLE temp_emp
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
EMP_NO
LAST_NAME
FIRST_NAME
TITLE
ADD1
PCODE
HOME_TEL
DATE
)The table I am inserting too is described below
Name                                      Null?    Type
EMP_NO                                             NUMBER
LAST_NAME                                          VARCHAR2(20)
FIRST_NAME                                         VARCHAR2(20)
TITLE                                         VARCHAR2(15)
ADD1                                             VARCHAR2(35)
PCODE                                              VARCHAR2(10)
HOME_TEL                                           VARCHAR2(20)
DATE_STARTED                                       DATECan anyone show me where I put truncate etc in my file and does TRAILING NULL COLS actually insert null when no data is present?
Cheers

Hi,
Thanks for the info.
I have the SEQUENCE SORTED and I believe that TRAILLING NULLCOLLS works fine too but I cannot seem to seem to find away to insert SYSDATE when no date exists in the flat file. Also, I cannot work out how to trim down the information if its too long for the column I want to insert too.
My CTL file again is like this
LOAD DATA
INFILE new_employees.csv
INTO TABLE temp_emp
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
EMP_NO       SEQUENCE(MAX, 1),
LAST_NAME,
FIRST_NAME,
TITLE,               
ADD1,
PCODE,               -- some pcodes are too long how can I trim them here?
HOME_TEL,
DATE_STARTED   -- What can I put here to say if NULL then use SYSDATE
)I did read the info and learned sequence easy enough but I couldn't find an answer to these last to questions.
Cheers
M

Similar Messages

  • Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc

    Hi,
    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?
    12.1.4 / 11g db
    Appreciate your inputs.
    Thanks,
    K

    Can SQL*Loader be used for Oracle html pages, for e.g Customer, Tasks etc. It should work.
    Reason: We have a job that creates leads, tasks in 11i, but r12 is not working as expected, What is the issue you have with R12?
    an SR is open with Oracle for a long time and no solution so far. I am thinking of using SQL*loader to populate the data, but these are html pages. Will SQL* Loader work?What was Oracle feedback? Did they say it is certified and can be used?
    Thanks,
    Hussein

  • IPad2 and a new MacBook running Lion, Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my Hotmail Id for my Apple Id and use it for iTunes, iCloud

    I have an iPad2 and a new MacBook running Mountain Lion. Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my current Hotmail Id for my Apple Id for iTunes, iCloud.
    Note, I will use both Hotmail and iCloud eMail.

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • Music and Video on Nas in folders but how do i set up itunes on multiple computers to see and use these files and create libraries?

    Music and Video on Nas in folders but how do i set up itunes on multiple computers to see and use these files and create libraries?
    So i have had a itunes set up on my old PC, bought a NAS and copied the folders over to the NAS, i did this incorrectly and so then even when i told the old PC to use that folder it saw all the songs but wasnt able to play the songs as it was looking in the incorrect place.
    So now i want my Mac as well as my PC and others to all use the music, videos etc on the NAS they are in itunes friendly folders (as they were compiled this way by the itunes on the old PC.
    When i tell the mac to use the itunes library.itl file it sees the song list (about 100gb) but cant see any songs, so i have removed this file to another location for now with the hope to set up a new file and then get it to see the songs on the folder from the NAS.
    Can someone tell me how to do this for all the Mac's and PC's on my network as i really want one master library that all use and add too.
    Thanks for your help in advance.

    I have the same question but I am using two pc's

  • HT4623 An Apple pop up keeps coming up anytime I try and use my phone and it has an old Apple ID and it is asking for the password. How do I get it to stop?

    An Apple pop up keeps coming up anytime I try and use my phone and it has an old Apple ID and it is asking for the password. How do I get it to stop?

    That means there is content on your phone...music and or apps...originally obtained using his Apple ID. Such content is forever tied to the account used to originally obtain it and cannot be transferred to another Apple ID. Your only choice is to identify and delete this content.

  • I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    Thanks - Of Course the first thing I checked and did.
    Disc Utility reads as follows:
    Capacity : 159.18 GB (159,182,127,104 Bytes)
      Format : Mac OS Extended (Journaled)  Available : 11.47 GB (11,472,896,000 Bytes)
      Owners Enabled : Yes  Used : 147.71 GB (147,709,231,104 Bytes)
      Number of Folders : 139,540  Number of Files : 511,832
    Activity Monitor(Disc Usage) shows something quite interesting.  Mac HD and Ramanan (Main User) - My hard drive is only 160GB!  Would the retired engineer gentleman please note as well.  Many thanks. Rams

  • HT201365 hello sir i purchase second hand iphone4s now my iphone ask for activation with id and password i contact with previous owner and use that id and password but that also not work what i do ola help me

    hello sir i purchase second hand iphone4s now my iphone ask for activation with id and password i contact with previous owner and use that id and password but that also not work what i do ola help me i try all other method restore ' upgrade etc but none work plz say what i do if u find some solution tham msg me on [email protected]

    First, we're not Apple here (Apple does not participate in this forum).  We're only users like you.
    The previous owner has not given you the correct ID and password for you to use.
    If the iphone has iOS version 7, then read through the following...
    http://support.apple.com/kb/HT5818

  • Hello sir i purchase second hand iphone4s now my iphone ask for activation with id and password i contact with previous owner and use that id and password but that also not work what i do ola help me i try all other method restore ' upgrade

    hello sir i purchase second hand iphone4s now my iphone ask for activation with id and password i contact with previous owner and use that id and password but that also not work what i do ola help me i try all other method restore ' upgrade etc but none work plz say what i do if u find some solution tham msg me on
    iPhone 4S

    oenkz33 wrote:
    this does not help at all for the second owner, after making the first owner id with careless, sorry for my english ...
    Careless? Possible, but unlikely. Most likely the phone was stolen from the first owner. It would be a VERY careless iPhone owner who did not erase their personal information from a phone before selling it, and to do that it is necessary to disable Activation Lock. In most places in the world knowingly using stolen property is a crime, so the fact that the phone doesn't work may be the least of one's risks.

  • Go and use my phone and in the top left hand corner it says no service. i have tried restoring the pone, resetting the network settings and also a hard reset as well.

    I have an iphone 5s and updated it to the new 7.1 software. A day later I go and use my phone and in the top left hand corner it says no service. i have tried restoring the pone, resetting the network settings and also a hard reset as well. It gains service for a short amount of time but then it loses service. Everyone else on my plan has service and their phones are completely normal but they never did the update... what can i do to fix this problem?

    Backup and restore your software via iTunes. If the problem continues, restore as a NEW device. If this solves it, that means there is some corruption in your backup file, or maybe it's one of your apps causing the trouble. If the problem is still there, you should take it to the Genius Bar at an Apple Store for evaluation.

  • My mum is always using my iPad and I want to set mode if you like that she can log in as some one different and use apps she likes and I can use a diFferent log in and use different apps and stuff

    My mum is always using my iPad and I want to set mode if you like that she can log in as some one different and use apps she likes and I can use a diFferent log in and use different apps and stuff

    iOS 7 does not support multiple user accounts like you want.
    If all the apps are different, you could set her up with her own page of apps, then just show her how to get to her apps page, or just buy her an iPad for herself.

  • Firefox keeps freezing and using 50% cpu and memory usage shoots up most of the time it's when there's an auto update of anything addon, plugin or ff!

    Firefox keeps freezing and using 50% cpu and memory usage shoots up real fast and carries on going till it uses up all there is left. Most of the time it's when there's an auto update of anything addon, plugin or ff but not just neccessarily then! I find out it's happened when there's been an update after i restart and an extra webpage comes up with the particular addon/plugin/ff update. I have to restart most of time because nothing sorts it out. I'm using windows xp with the latest update of ff 13.0.1 it's not this version because it's been happening for a while. And it never started when i added a particular addon or plugin or when i added a new app to my pc either. Any idea as to what this may be or how i'd sort it out?
    Cheers

    Maybe disable hardware acceleration? This article should help: https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-ram

  • EXTENDED_PROGRAM_CHECK please explain this FM and uses of this and Sub FM

    EXTENDED_PROGRAM_CHECK please explain this FM and uses of this and Sub FM
    Points Awarded if useful answer,

    Hi,
    This is FM for extended program checking. Description of implemented tests when making the test selection.
    This same same as the extended program check of the SE38 program.
    Open any program in ABAP editor.
    Goto program->check->extended program check.
    Select the check boxes and execute. It displays all the error and warning of the selected crieteria. Now you can check all these error conditions. The FM is for achieving the same functionality
    Hope this helps.
    Regards,
    Richa

  • HT5634 27 in late 2009 iMac and using bootcamp 4 and windows 8 64 bit I am getting a error message upon startup

    I have a 27 in late 2009 iMac and using bootcamp 4 and windows 8 64 bit I am getting a error message upon startup.  Any way to fix it?

    Windows 8 is not supported on your computer.
    http://support.apple.com/kb/HT5634

  • I have an 27 inch apple iMac 2010. Can I upgrade by buying a Mac book pro and use plug in and use the iMac as a screen only?

    I have an 27 inch apple iMac 2010. Can I upgrade by buying a Mac book pro and use plug in and use the iMac as a screen only?

    Yes your 2010 supports Target Display Mode using MiniDisplay Port input.
    check out FAQ #4 > Target Display Mode: Frequently Asked Questions (FAQ) 

  • I use iPad3 and used to buy and load free products on the App Store but recently any time I want to buy or download free apps, a popup will appear informing me that my apple ID has been disabled. I have changed my password many time, no diff. Help!

    My name is Amos. I use iPad3 64GB and have been buying and downloading from App Store but recently, each time I want to buy or down load apps from the store, I will receive a popup, "your apple ID has been disabled". I have made efforts to download to no avail and have also change my password severally and later my username and still I get the same message. Now, I can neither buy nor download free apps from the store. What do I do? I need help!

    Read the tips in this article and see if any of them work for you. You may need to contact iTunes Support in order to get this resolved.
    https://sites.google.com/site/appleclubfhs/support/advice-and-articles/apple-id- disabled

Maybe you are looking for

  • ITunes freezes on my macbook pro when i sync my iphone

    Hi guys -- I've been following tons of threads to get an answer - can you help? Out of nowhere, my iPhone can't sync with iTunes - whenever I plug in my iPhone, iTunes freezes, and I get the rainbow beachball. After a bit, I get a message that my com

  • Monitoring servers in SCOM 2012 via different locals within the same management group

    Hi, I have 2 management servers in a same management group. The 1st one is having English (US) locale while other is installed on Swedish locale. Both are accessed by different users having same admin rights. Once a USER 1 try to register a server th

  • Help with Possible Mask Bug in CF8

    When letting a user edit their PRICE field at my website, I populate the field with the VALUE attribute (as seen below) using a MASK: <CFINPUT TYPE="TEXT" NAME="price" VALUE="#price#" SIZE="7" MAXLENGTH="7" MASK="9999999">Enter your price <B>without<

  • RoboHelp 9 compatible with RoboHelp 8?

    Can anyone tell me if RH 9 is backward compatible with RH8? We are a training group, and plan to bring on a new person. We all have Technical Communication Suite 2, and it appears you can't buy that anymore. Plus, Captivate 5 is NOT backward compatib

  • Vertical Alignment and Loading

    Two questions. I've just uploaded a client's site as a sub-folder of my own in order to test it out. www.rebeccapike.co.uk/home.html I want to know how to center the page horizontally having used <div> tags and placed everything within a base layer.