Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqlldr error

Status
Not open for further replies.

syncdba

IS-IT--Management
Nov 28, 2005
206
US
Hi,
while using SQLLDR I'm getting these Errors:
Column Name Position Len Term Encl Datatype
---------- ---------- ----- ---- ---- ----------
COURSE_IDENTIFIER FIRST * , CHARACTER
SQL string for column : "stage_courses_s.nextval"
DATA_SOURCE NEXT * , CHARACTER
SQL string for column : "LTRIM(RTRIM:)DATA_SOURCE))"

Record 1: Rejected - Error on table STAGE_COURSES, column COURSE_IDENTIFIER.
Field in data file exceeds maximum length
Record 2: Rejected - Error on table STAGE_COURSES.
ORA-01400: cannot insert NULL into ("XXHD_TP2"."STAGE_COURSES"."DATA_SOURCE")

Record 3: Rejected - Error on table STAGE_COURSES.
ORA-01400: cannot insert NULL into ("XXHD_TP2"."STAGE_COURSES"."DATA_SOURCE")
...For all records.
===========================================================
Stage_Course Tablestucture :

NAME TYPE Nullable
---------------------------------------------
COURSE_IDENTIFIER NUMBER N
DATA_SOURCE VARCHAR2(255) N

Thanks in advance.
 

Provide:

1) controlfile
2) sample of data
3) description of target table

[shadeshappy]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
CONTROL FILE
===============
LOAD DATA
INFILE 'courses.csv'
APPEND
INTO TABLE stage_courses
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
COURSE_IDENTIFIER "stage_courses_s.nextval" ,
COURSE_TITLE "LTRIM(RTRIM:)COURSE_TITLE))" ,
COURSE_DESCRIPTION nullif COURSE_DESCRIPTION=blanks,
COURSE_OBJECTIVE nullif COURSE_OBJECTIVE=blanks,
AVAILABLE_FROM "LTRIM(RTRIM:)AVAILABLE_FROM))" ,
DISCONTINUED_FROM "LTRIM(RTRIM:)DISCONTINUED_FROM))" ,
TRAINING_UNITS nullif TRAINING_UNITS=blanks,
PRICE INTEGER EXTERNAL,
COURSE_NUMBER "LTRIM(RTRIM:)COURSE_NUMBER))" ,
MAX_LEARNERS_COUNT "LTRIM(RTRIM:)MAX_LEARNERS_COUNT))" ,
MIN_LEARNERS_COUNT "LTRIM(RTRIM:)MIN_LEARNERS_COUNT))" ,
MAX_LEARNER_WAITLIST INTEGER EXTERNAL,
LANGUAGE nullif LANGUAGE=blanks,
DELIVERY_TYPE nullif DELIVERY_TYPE=blanks,
DATA_SOURCE "LTRIM(RTRIM:)DATA_SOURCE))" ,
CREATION_DATE sysdate )

SAMPLE OF DATA
================
Administration AIX et Solaris,,,12/20/2001 0:00,11/7/2003 0:00,,,AGUF,8,2,,,,Gescof,4/21/2006 0:00,,

DATA IN STAGE_COURSES
======================

Available data Discontinued_Date
7/14/1999 10/16/2000

I have changed the "|" delimiter to ","
Now I'm getting different errors:

Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ----
AVAILABLE_FROM NEXT * , CHARACTER
SQL string for column : "LTRIM(RTRIM:)AVAILABLE_FROM))"
DISCONTINUED_FROM NEXT * , CHARACTER
SQL string for column : "LTRIM(RTRIM:)DISCONTINUED_FROM))"

Record 1: Rejected - Error on table STAGE_COURSES, column AVAILABLE_FROM.
ORA-01858: a non-numeric character was found where a numeric was expected

Record 2: Rejected - Error on table STAGE_COURSES, column AVAILABLE_FROM.
ORA-01843: not a valid month
Record 10: Rejected - Error on table STAGE_COURSES, column DISCONTINUED_FROM.
ORA-01843: not a valid month




 

The columns in your control file have to be in the order of the input data file, followed by constatns, sequences, etc...

Move: COURSE_IDENTIFIER "stage_courses_s.nextval" ,

to before:
CREATION_DATE sysdate

[thumbsup]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top