0

This here is my data file Sample1.dat

10013010-05-202212-05-202217-05-2022Not WellS5  A
10113111-04-202112-04-202112-04-2022Fever   A365P
10213201-07-202203-07-202206-07-2022VacationC5  R
10313301-03-202201-03-202207-03-2022Not wellS6  A
10413415-02-202216-02-202218-02-2022HospitalS2  P

This is my control file Controlfile1.ctl

LOAD DATA
INFILE 'Sample1.dat'
APPEND INTO TABLE EMP_LEAVE(
REQUEST_NO  POSITION(01:03)     NUMBER,
EMPNO       POSITION(04:06)     NUMBER,
REQUEST_DATE    POSITION(07:16)     DATE "DD-MON-YYY",
START_DATE  POSITION(17:26)     DATE "DD-MON-YYY",
END_DATE    POSITION(27:36)     DATE "DD-MON-YYY",
REASON      POSITION(37:44)     VARCHAR2,
LEAVE_TYPE  POSITION(45:45)     CHAR,
NO_OF_DAYS  POSITION(46:48)     NUMBER,
APPROVAL    POSITION(49:49)     CHAR
)

When I try to call it in sql loader, I get the following error

SQL*Loader-350: Syntax error at line 4.
Expecting valid column specification, "," or ")", found "NUMBER".
REQUEST_NO      POSITION(01:03)         NUMBER,

Can someone help me out?

jarlh
  • 42,561
  • 8
  • 45
  • 63
John Joy
  • 7
  • 1
  • Refer to Littlefoot's [answer](https://stackoverflow.com/a/57284157/19538002) It will help you resolve this issue. – Courser Xu Jul 20 '22 at 10:03
  • Thanks for the reply. It worked but now i got a new error saying the 'REASON' column is exceeding the limit even though the limit that I've set is 30 and it doesn't exceed that and also I did change varchar2 to varchar – John Joy Jul 20 '22 at 12:14
  • Please edit your original post to show your changes. – Gary_W Jul 20 '22 at 13:12

0 Answers0