Bonjour,
J'essaie d'importer des données dans une table SQL-Server a partir d'un fichier texte. J'utilise pour ca BULK INSERT et un fichier .fmt.
Une colonne de ce fichier est une date de la forme: "YYYY/MM/DD HH:MM:SS", or dans la colonne de destination de ma base, le format est: "DD/MM/YYYY HH:MM:SS". Impossible donc de faire l'import.
Cette conversion doit elle etre faite en choisissant le bon "Collation" ?
Voici mon format de fichier source:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
8.0
17
1   SQLDATETIME	0 20	","     3    debut_appel	SQL_Latin1_General_Cp437_BIN
2   SQLBINARY	0 8	","     4    duree_appel      	SQL_Latin1_General_Cp437_BIN
3   SQLINT	0 4	","     5    duree_sonnerie     	SQL_Latin1_General_Cp437_BIN
4   SQLCHAR	0 20	","     6    appelant                   	SQL_Latin1_General_Cp437_BIN
5   SQLCHAR	0 1	","     7    direction            	SQL_Latin1_General_Cp437_BIN
6   SQLCHAR 	0 20	","     8    numero_appele  	SQL_Latin1_General_Cp437_BIN
7   SQLCHAR 	0 20	","     9    numero_compose	SQL_Latin1_General_Cp437_BIN
8   SQLCHAR 	0 20	","     10  compte              	SQL_Latin1_General_Cp437_BIN
9   SQLBIT	0 1	","     11  interne          	SQL_Latin1_General_Cp437_BIN
10 SQLINT 	0 4	","      2   id_appel                 	SQL_Latin1_General_Cp437_BIN
11 SQLBIT 	0 1	","     12 multiligne       	SQL_Latin1_General_Cp437_BIN
12 SQLCHAR 	0 20	","     13 corres1_type     	SQL_Latin1_General_Cp437_BIN
13 SQLCHAR 	0 20	","     14 corres1_nom       	SQL_Latin1_General_Cp437_BIN
14 SQLCHAR 	0 20	","     15 corres2_type     	SQL_Latin1_General_Cp437_BIN
15 SQLCHAR	0 20	","     16 corres2_nom       	SQL_Latin1_General_Cp437_BIN
16 SQLINT 	0 4	","     17 duree_pause          	SQL_Latin1_General_Cp437_BIN
17 SQLINT	0 4	"\r\n" 18 duree_attente         	SQL_Latin1_General_Cp437_BIN
Voila donc c'est la premiere ligne qui me pose probleme.
Merci pour toute indication