Solved

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

Posted on 2014-04-08
2
358 Views
Last Modified: 2016-02-10
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.
0
Comment
Question by:tesla764
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 39986560
None that I'm aware of.

SSIS requires a 'contract' between a source and destination, with columns defined, and has a tendency to throw a lot of mapping errors when there is any doubt of those definitions.

So even if it was possible, SSIS is not optimized to handle 'dynamic' data sources.
0
 

Author Closing Comment

by:tesla764
ID: 39992774
Thanks.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question