DB2 : load - SQL/NoSQL - Programmation
Marsh Posté le 28-01-2008 à 13:28:37
tu as un décalage dans tes champs, manifestement il s'attend a trouver une date a un endroit ou tu lui fournis de l'alpha,
truc bizarre dans ton fichier: "A""ANUA" non séparé par une virgule
Marsh Posté le 28-01-2008 à 18:24:43
Merci bcp pour votre réponse toute fois j'ai pu régler le premier problème mais malheureusement j'ai rencontrer un autre voir ci-dessous :
Le fichier UKcp est sous le format suivante :
AEXA1A.T.E.X.A. (ACCIDENT TRAVAIL EXPLOITANT AGRICOLE) 2002-04-08AANUA1ANNUAIRE 2003-01-01ACOMM1ENSEMBLE DES APPLICATIONS COMMUNES 2002-05-22AFIPA1FICHIER IDENTIFICATION POPULATION AGRICOLE 2002-01-01ANDCO1DICTIONNAIRE DE DONNEES GENERALES 2003-05-25APARC1PLATEFORME COMMUNE D'ACCES AUX REPERTOIRES 2005-02-21ASARA1S.A.R.A 2003-01-13A
quand j'essaie d'exécuter la comande suivante il me rejet un enregistrement le 8éme sachant que le fichier contient seulement 7 enregistrement de taille 66 :
load from d:\UKcp OF ASC
modified by packeddecimal binarynumerics nullindchar=?
reclen=66
method L (
1 4 ,
5 5 ,
6 55 ,
56 65 ,
66 66
)
null indicators (
0,
0,
0,
0,
0
)
insert into DDACPRTU.DDAPPL0T copy no;
Erreur :
-------
SQL3500W The utility is beginning the "LOAD" phase at time "2008-01-28
17.59.10.958141".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3137W Row "8" is too short. At least one input value being loaded to a
non-nullable column is missing. The row was not loaded.
SQL3185W The previous error occurred while processing data from row "F0-8" of
the input file.
SQL3227W Record token "F0-8" refers to user record number "8".
SQL3110N The utility has completed processing. "8" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "8".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "2008-01-28
17.59.10.978517".
SQL3500W The utility is beginning the "BUILD" phase at time "2008-01-28
17.59.10.979564".
SQL3213I The indexing mode is "INCREMENTAL".
SQL3515W The utility has finished the "BUILD" phase at time "2008-01-28
17.59.11.016727".
SQL3500W The utility is beginning the "DELETE" phase at time "2008-01-28
17.59.11.042350".
SQL3509W The utility has deleted "7" rows from the table.
SQL3515W The utility has finished the "DELETE" phase at time "2008-01-28
17.59.11.060547".
SQL3107W There is at least one warning message in the message file.
Number of rows read = 8
Number of rows skipped = 0
Number of rows loaded = 7
Number of rows rejected = 1
Number of rows deleted = 7
Number of rows committed = 8
Marsh Posté le 28-01-2008 à 18:34:40
est comment puis-je enlever le retour à la ligne via l'editeur vi ?
Marsh Posté le 29-01-2008 à 10:45:29
Merci bcp pour votre réponse mais en utilisant dd je n'ai pas pu supprimer le retour à la ligne.
La méthode que j'ai utilisé est la suivante :
awk '{ printf $0}' test1 > test2
Là je suis sure qu’avec printf j'aurai pas de retour à la ligne.
Marsh Posté le 28-01-2008 à 12:47:37
Bonjour,
J'essaie d'exécuter la commande suivante :
load from d:\TEST1.txt OF ASC
modified by dateformat="DD/MM/YYYY" packeddecimal binarynumerics nullindchar=?
reclen=66
method L (
1 4 ,
5 5 ,
6 55 ,
56 65 ,
66 66
)
null indicators (
0,
0,
0,
0,
0
)
insert into DDACPRTU.DDAPPL0T copy no;
Contenue du FICHIER TEST1 :
"AEXA","1","A.T.E.X.A. (ACCIDENT TRAVAIL EXPLOITANT AGRICOLE) ",08/04/2002,"A""ANUA","1","ANNUAIRE
",01/01/2003,"A""COMM","1","ENSEMBLE DES APPLICATIONS COMMUNES ",22/05/2002,"A""FIPA","1","FICHIER IDENTIFICA
TION POPULATION AGRICOLE ",01/01/2002,"A""NDCO","1","DICTIONNAIRE DE DONNEES GENERALES ",25/05/2003,"A""PARC"
,"1","PLATEFORME COMMUNE D'ACCES AUX REPERTOIRES ",21/02/2005,"A""SARA","1","S.A.R.A
",13/01/2003,"A"
Mais je rencontre les messages suivants :
SQL3500W The utility is beginning the "LOAD" phase at time "2008-01-28
12.27.02.724823".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3191N The field in row "F0-1", column "56" which begins with "ICOLE) ",0"
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-1" of
the input file.
SQL3191N The field in row "F0-2", column "56" which begins with "A""COMM",""
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-2" of
the input file.
SQL3191N The field in row "F0-4", column "56" which begins with "OLE "
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-4" of
the input file.
SQL3191N The field in row "F0-5", column "56" which begins with "ERALES "
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-5" of
the input file.
SQL3191N The field in row "F0-6", column "56" which begins with "MUNE D'ACC"
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-6" of
the input file.
SQL3191N The field in row "F0-7", column "56" which begins with "A.R.A ","
does not match the user specified DATEFORMAT, TIMEFORMAT, or TIMESTAMPFORMAT.
The row will be rejected.
SQL3185W The previous error occurred while processing data from row "F0-7" of
the input file.
SQL3137W Row "8" is too short. At least one input value being loaded to a
non-nullable column is missing. The row was not loaded.
SQL3185W The previous error occurred while processing data from row "F0-8" of
the input file.
SQL3227W Record token "F0-1" refers to user record number "1".
SQL3227W Record token "F0-2" refers to user record number "2".
SQL3227W Record token "F0-4" refers to user record number "4".
SQL3227W Record token "F0-5" refers to user record number "5".
SQL3227W Record token "F0-6" refers to user record number "6".
SQL3227W Record token "F0-7" refers to user record number "7".
SQL3227W Record token "F0-8" refers to user record number "8".
SQL3110N The utility has completed processing. "8" rows were read from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "8".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time "2008-01-28
12.27.02.757870".
SQL3500W The utility is beginning the "BUILD" phase at time "2008-01-28
12.27.02.759154".
SQL3213I The indexing mode is "REBUILD".
SQL3515W The utility has finished the "BUILD" phase at time "2008-01-28
12.27.02.852219".
SQL3500W The utility is beginning the "DELETE" phase at time "2008-01-28
12.27.02.891513".
SQL3509W The utility has deleted "1" rows from the table.
SQL3515W The utility has finished the "DELETE" phase at time "2008-01-28
12.27.02.894687".
SQL3107W There is at least one warning message in the message file.
Number of rows read = 8
Number of rows skipped = 0
Number of rows loaded = 1
Number of rows rejected = 7
Number of rows deleted = 1
Number of rows committed = 8
Merci de m'aider sur ce sujet.