1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to Insert Sysdate in control File?

Discussion in 'Oracle Apps Technical' started by jagadekara, Dec 12, 2013.

  1. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi All,
    I am inserting records in my Staging Table. My table have Creation_Date column. but user gave me data file with out Creation date column in it. So I want sysdate in that column. So how I can write the code in control file?
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.

    if the tool of loading doesn't allow to set value by default for field,then
    it is possible to use value by default for field in the table or
    the trigger for table to set value of field.
     
  3. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi,
    Thanks for reply. The SQL Loader allows to take default value from control file.
    In control file I just used sysdate for creation_date column like below.

    col1,
    col2,
    creation_date sysdate,
    col4,
    col5

    So after run the script records loaded into my table. Creation_date column populated with sysdate.