Could not bulk insert.
Publicado por EDGAR (44 intervenciones) el 20/11/2007 02:28:02
Amigos, tengo un problema, miren estoy tratando de cargar data de un txt a una tabla temporal, usando bulk insert, esa es mi sintaxis
--Insertar archivo en tabla temporal
SET @sql = N'Bulk Insert TEMPORAL From ''' + @ruta + N'\' + @archivo +
N''' With (FORMATFILE = ''' + @ruta + '\archivo_de_formato.txt''' +
N', CODEPAGE = ''' + 'ACP' + ''', MAXERRORS = 3' + N')'
EXECUTE sp_executesql @sql
y me sale el siguiente error "Could not bulk insert. Error reading destination table column name for source column 1 in format file ...\archivo_de_formato.txt "
a q se debe todo esto, espero me pueda ayudar, gracias de antemano
--Insertar archivo en tabla temporal
SET @sql = N'Bulk Insert TEMPORAL From ''' + @ruta + N'\' + @archivo +
N''' With (FORMATFILE = ''' + @ruta + '\archivo_de_formato.txt''' +
N', CODEPAGE = ''' + 'ACP' + ''', MAXERRORS = 3' + N')'
EXECUTE sp_executesql @sql
y me sale el siguiente error "Could not bulk insert. Error reading destination table column name for source column 1 in format file ...\archivo_de_formato.txt "
a q se debe todo esto, espero me pueda ayudar, gracias de antemano
Valora esta pregunta


0