Bonjour,
J'ai un fichier texte test.txt qui a la structure suivante :
00001NOM1PRENOM1ADRESSE1
00002NOM2PRENOM2ADRESSE2
00003NOM3PRENOM3ADRESSE3
00004NOM4PRENOM4ADRESSE4
00005NOM5PRENOM5ADRESSE5
une table test avec la structure suivante :
1 MATRICULE nvarchar 5
2 NOM nvarchar 4
3 PRENOM nvarchar 7
4 ADRESSE nvarchar 8
et j'ai fais un bulk insert comme suite :
BULK INSERT [test] FROM 'E:\test.txt'
WITH
(
FORMATFILE = 'E:\test.fmt'
)
le contenu du fichier test.fmt et le suisvant :
8.0
4
1 SQLCHAR 0 5 "" 1 MATRICULE Arabic_CI_AS
2 SQLCHAR 0 4 "" 2 NOM Arabic_CI_AS
3 SQLCHAR 0 7 "" 3 PRENOM Arabic_CI_AS
4 SQLCHAR 0 8 "\R\N" 4 ADRESSE Arabic_CI_AS
et mon problème est le suivant :
quand j'xecute l'instruction bulk insert sql server me repond :
La ou les commandes ont réussi.
mais quand je verifie ma table test je la trouve encore vide et aucune insertion n'a été faite
et merci d'avance.
Partager