dbTalk Databases Forums  

Create Destination Table based on text file

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Create Destination Table based on text file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Susan
 
Posts: n/a

Default Create Destination Table based on text file - 08-04-2003 , 01:54 PM






Is there a way in DTS to create a destination table based
upon the format of a text file source?

In the transform data task, you can use the Create Table
button to do this, but I would like to automate a package
to create a table with a changing source file for each
execution. What is the Create Table button doing to read
the source file?

Thanks,
Susan

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Create Destination Table based on text file - 08-04-2003 , 04:38 PM






In article <034e01c35ab9$d6e8b390$a301280a (AT) phx (DOT) gbl>, Susan
<soconnell (AT) aspirity (DOT) com> writes
Quote:
Is there a way in DTS to create a destination table based
upon the format of a text file source?

In the transform data task, you can use the Create Table
button to do this, but I would like to automate a package
to create a table with a changing source file for each
execution. What is the Create Table button doing to read
the source file?

Thanks,
Susan
Unfortunately the Create Table options and the associated logic to parse
the file and generate a table structure is only available at
design-time, so there is no way of automating this in pure DTS. You
could of course write your own code to parse the text file and generate
your own create table statement. This could be done in an ActiveX Script
Task or perhaps a custom task.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.