Wednesday, March 28, 2012

Import Large Record Fixed Length Text File

I am trying to import a large record (about 13k per record) fixed length file into SQL Server. I have built a format file and would like to now import the data. My understanding is that SQL Server limits record sizes to 1024, so I should only select the columns I really need in the format file. Can I perfrom the import without having to create the table ahead of time. I may change the columns that I include an I don't want to have to keep changing the table as well as the format file.

Will the bcp or bulk insert utlility create a table based on the format file or do I just have to tuff it out and make changes in both the format file and the table and be sure that they match?SQL server only supports bcp / bulk inserts into existing tables ...|||Thanks for the info|||What version of sql are you using|||The only reason I ask is that sql 2k supports 8K records.

BTW. You could always use DTS. Which will allow you to choose which columns you import and create a table ( please if you use this don't accept the default of varchar(255) Ugh!! )|||Please post the structure of the data you are importing - data type/size ... And maybe even attach a sample of the data. You have various options like text/ntext/image when importing into sql server to help with 8k boundary - but this is highly dependent on your data structure. You can play with dts and go to transformations to change the data types.sql

No comments:

Post a Comment