[dba-SQLServer] table definition file

Stuart McLachlan stuart at lexacorp.com.pg
Fri Mar 23 15:54:00 CDT 2012


I'd  just use a text editor with decent regexp find/replace (Crimson Editor?) to convert the list 
into a Create Table SQL query.  It should only take a couple of minutes.

Heck, if you want to send me the definition file, I will do a first pass on it for you.

-- 
Stuart

On 23 Mar 2012 at 12:36, jwcolby wrote:

> Guys,
> 
> I got a database today which I suspect is a flat file, fixed width, pad right.
> 
> I got a "table definition file" with hundreds of lines like:
> 
> 365,Physical_Address_Results,varchar(50)
> 
> Which is basically column number, field name, data type.
> 
> Is there anything built in to SQL Server to take such a table definition file and create the table 
> from it?
> 
> Once created, something to pull the fixed width file into such table?
> 
> The file itself is 270 GIGABYTES with a .txt extension.  I am having a problem even seeing the 
> contents.  I imagine I can open it in SQL Server directly in the import wizard but I really don't 
> want to have to manually go set up the fixed width import stuff from inside of that wizard.
> 
> -- 
> John W. Colby
> Colby Consulting
> 
> Reality is what refuses to go away
> when you do not believe in it
> 
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 




More information about the dba-SQLServer mailing list