Specifying the Position of a Data Field
To load data from the datafile, SQL*Loader must know the length and location of the field. To specify the position of a field in the logical record, use the POSITION
clause in the column specification. The position may either be stated explicitly or relative to the preceding field. Arguments to POSITION
must be enclosed in parentheses. The start, end, and integer values are always in bytes, even if character-length semantics are used for a datafile.
The syntax for the position specification (pos_spec) clause is as follows:
Description of the illustration pos_spec.gif
https://docs.oracle.com/cd/B28359_01/server.111/b28319/ldr_field_list.htm#i1006477
. 1 (hiredate SYSDATE, 2 deptno POSITION(1:2) INTEGER EXTERNAL(2) NULLIF deptno=BLANKS, 3 job POSITION(7:14) CHAR TERMINATED BY WHITESPACE NULLIF job=BLANKS "UPPER(:job)", mgr POSITION(28:31) INTEGER EXTERNAL TERMINATED BY WHITESPACE, NULLIF mgr=BLANKS, ename POSITION(34:41) CHAR TERMINATED BY WHITESPACE "UPPER(:ename)", empno POSITION(45) INTEGER EXTERNAL TERMINATED BY WHITESPACE, sal POSITION(51) CHAR TERMINATED BY WHITESPACE "TO_NUMBER(:sal,'$99,999.99')", 4 comm INTEGER EXTERNAL ENCLOSED BY '(' AND '%' ":comm * 100" )