2 Replies Latest reply: Feb 27, 2013 1:23 PM by Srini Chavali-Oracle RSS

    Sql Loader

    963739
      Hi,

      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

      I am trying to get rid of Spaces while using sql loader to load data...
      LOAD DATA
      INTO TABLE DB_LOAD
      WHEN EXEC != BLANKS
      (
       D_NUMBER            POSITION(   1:   9) NULLIF D_NUMBER=BLANKS,
       EXEC                    POSITION( 165: 215) "trim(:EXEC)" NULLIF EXEC  =BLANKS,
       BIOGRAPHY              POSITION( 216:1115) NULLIF BIOGRAPHY  =BLANKS,
       P_ID              "tmp_db_p_id_s.nextval"
       )
      Is that right to give like this
       EXEC                    POSITION( 165: 215) "trim(:EXEC)" NULLIF EXEC  =BLANKS,
        • 1. Re: Sql Loader
          Srini Chavali-Oracle
          Pl post description of the table. If the EXEC column is VARCHAR2, likely the whitespace will be trimmed automatically

          http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_field_list.htm#SUTIL1210

          HTH
          Srini
          • 2. Re: Sql Loader
            Vijay Reddy
            Try with TRAILING NULLCOLS
            LOAD DATA
            INTO TABLE DB_LOAD
            WHEN EXEC IS NOT NULL -- <> ''
            TRAILING NULLCOLS
            (
             D_NUMBER            POSITION(   1:   9) ,
             EXEC                    POSITION( 165: 215) ,
             BIOGRAPHY          POSITION( 216:1115),
             P_ID                    "tmp_db_p_id_s.nextval"
             )