Bulk insert with a format file?
<a rel="nofollow" style='text-decoration: none;' href="http://www.mindsdoor.net/SQLTsql/BCP_quoted_CSV_Format_file.html" target="_blank">http://www.mindsdoor.net/SQLTsql/BCP_quoted_CSV_Format_file.html</a>
Bulk insert with a staging table?
<a rel="nofollow" style='text-decoration: none;' href="http://www.mindsdoor.net/SQLTsql/ImportTextFiles.html" target="_blank">http://www.mindsdoor.net/SQLTsql/ImportTextFiles.html</a>
You can generate the format file for the first one or the inser statement in
the second from the structure of the destination table if you have set the
column sizes to match the file.
If you have a lot of different files consider holding the metadata in a table
<a rel="nofollow" style='text-decoration: none;' href="http://www.mindsdoor.net/SQLTsql/MoveImportData.html" target="_blank">http://www.mindsdoor.net/SQLTsql/MoveImportData.html</a>
"Tom" wrote:
> Hello,
>
> Is there a simple answer to this simple question?
>
> How to import fixed-width text file?
>
> I know the width of the columns but there are so many that I don't want
> redefine them. I have already a table build for that data with the necessary
> fields width. In dbase it was such a simple thing to do...
>
> Note:
> I went through the Import wizard in MS SQL 2000 and I could not find any
> thing there about importing fixed-width text file.
>
>
> Any help is greatly appreciated,
> Les
>
>
> >> Stay informed about: How to import fixed-width text file in MS SQL 2000?