Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    2

    Unanswered: How to populate default date in SQL loader

    Hi,

    I have one of the sql loader script and we are populatinga s load-dt as sysdate and its working fine.

    now i would like to populate as some date insted of SYSDTAE

    any help please on this ?
    existing code :

    LOAD_DT SYSDATE working fine

    LOAD_DT need to populate as 2011-01-01

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    To_date('2011-01-01','yyyy-mm-dd')
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2011
    Posts
    2
    its not working ...

    in future dat emay change so i need to pass that date parameter like MMMYY01 is there any way we can do this ?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >its not working ...
    Yes it is. Solution met posted requirement!

    >in future dat emay change so i need to pass that date parameter like MMMYY01 is there any way we can do this ?
    text files are static by their very nature & do NOT accept parameter.
    If EXTERNAL TABLE were used in place of SQL*Loader then solution might exist within PL/SQL procedure
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by jagadish9 View Post
    Blah, blah blah...

    LOAD_DT SYSDATE working fine

    LOAD_DT need to populate as 2011-01-01
    If the column LOAD_DT in the table is DATE data type, then SYSDATE will work fine otherwise use anacedent's suggestion.

    Date types DO NOT have specific format, if you need to convert from/to some other format than the configured default, use the TO_CHAR()/.TO_DATE() functions.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •