3 Replies Latest reply: Jul 23, 2009 1:46 AM by 706055 RSS

    Using constant values in SQL Loader control file

    539772
      Hi,

      I have a requirement where I need to migrate the data of 6 tables from MS Access into Oracle data base. I have written SQL Loader scripts so that I can create CSV files based on MS Access data and then migrate into Oracle. But in Oracle tables we have 4 common columns like Create_By, Created_Date,Updated_By and Update_Date, and those fields should be taken care by system. So, basically system should update login user ID and sysdate values in respective columns. My question here is, I do not have above mentioned common columns in MS Access tables. So, can I hard code those values in control file by saying

      Created_By CONSTANT user,
      Create_Date CONSTANT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS'),
      Updated_By CONSTANT user,
      Updated_Date CONSTANT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS')


      Please let me know your valuable suggestions.