Link to home
Start Free TrialLog in
Avatar of tesla764
tesla764

asked on

Create a table based on the data structure and data types in a txt file

Is there a way to create a table based on the data structure and data types in a txt file.

Let's say in the .txt file the data structure is as follows...

Column 0 is a field length of 50 characters
Column 0 is a field length of 50 characters
Column 0 is a field length of 1000 characters
Column 0 is a field length of 50 characters
Column 0 is a field length of 1000 characters


I'd like to create the table as...

CREATE TABLE [BulkTable] (
    [Column 0] varchar(50),
    [Column 1] varchar(50),
    [Column 2] varchar(1000),
    [Column 3] varchar(50),
    [Column 4] varchar(1000)
)

But without having to maunually change the column 2 and column 4 fields to varchar(1000). Is there a way create the BulkTable using the data structure from the .txt file?

I am using SSIS data flow package creation.
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tesla764
tesla764

ASKER

Thanks.