dbTalk Databases Forums  

dynamic table creation from text files

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


Discuss dynamic table creation from text files in the microsoft.public.sqlserver.dts forum.



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

Default dynamic table creation from text files - 05-10-2006 , 01:30 PM






Hi,

I have 10 .txt files in a directory and I want loop through the
directory dynamically creating a table in SQL for each .txt file. Each
text file has a different column list that's why it has to be
dynamic.

Thanks in advance,

Tom


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dynamic table creation from text files - 05-15-2006 , 05:41 AM






Hello T,


OK so the looping is easy.

The next thing you will need to do is to look at the text file and have a
way od deciding what the attribute data types will be. Once you have this
then you can build a CREATE TABLE script against your destination. You execute
that. Now you have a DataPump task that you set the DestinationObjectName
property to be that of the table you just created.

You now need to build the Transformations from scratch but luckily this can
be done programmatically as well.


Make sense

Allan


Quote:
Hi,

I have 10 .txt files in a directory and I want loop through the
directory dynamically creating a table in SQL for each .txt file.
Each
text file has a different column list that's why it has to be
dynamic.
Thanks in advance,

Tom




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.