1 Reply Latest reply on Jul 8, 2020 7:30 PM by Adrian_Popescu-Oracle

    Oracle SQLLDR - customize column data values

    InfoDoc

      I have a mapping which uses sql loader

       

      Oracle sql loader can do many things with column values during the import

       

      see

       

      https://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_field_list.htm#SUTIL1190

       

       

      for example here is a simple substring (substr) example in a control file

       

      sqlldr

      LOAD DATA

        INFILE 'mail_orders.txt'

        BADFILE 'bad_orders.txt'

        APPEND

        INTO TABLE mailing_list

        FIELDS TERMINATED BY ","

        (  addr,

           city,

           state,

           zipcode,

           mailing_addr   "decode(:mailing_addr, null, :addr, :mailing_addr)",

           mailing_city   "decode(:mailing_city, null, :city, :mailing_city)",

           mailing_state,

           move_date      "substr(:move_date, 3, 2) || substr(:move_date, 7, 2)"

        )

       

       

      how can I do that in a mapping which uses the

        LKM File to Oracle (SQLLDR)

       

      loading knowledge module?