Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Creating tables on the fly with SSIS Expand / Collapse
Author
Message
Posted Wednesday, August 11, 2010 10:23 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, September 19, 2013 7:41 AM
Points: 1,626, Visits: 477
Phil, my apologies.

Should have tried it a little more before I ASSUMED that SSIS would be logical. Guess it's not as straight forward as I thought.

Rich
Post #967591
Posted Wednesday, August 11, 2010 11:10 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 4:41 AM
Points: 4,828, Visits: 11,180
Rich-403221 (8/11/2010)
Phil, my apologies.

Should have tried it a little more before I ASSUMED that SSIS would be logical. Guess it's not as straight forward as I thought.

Rich


No problem - and you learned something along the way, which is good

SSIS is logical ... but perhaps it becomes so only after spending a lot of time with it. At some point, the philosophy 'clicks' and after that it becomes your friend.

Phil



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #967631
Posted Wednesday, August 11, 2010 11:17 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, September 19, 2013 7:41 AM
Points: 1,626, Visits: 477
Agreed. But, I have spent a fair amount of time with it, just sometimes forget that there are some "quirks" that can get in the way of doing something which should be relatively straight forward.
Post #967640
Posted Wednesday, September 25, 2013 11:54 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, April 08, 2014 2:40 AM
Points: 1,118, Visits: 1,573
Phil Parkin (8/11/2010)
Rich-403221 (8/11/2010)
Phil, my apologies.

Should have tried it a little more before I ASSUMED that SSIS would be logical. Guess it's not as straight forward as I thought.

Rich


No problem - and you learned something along the way, which is good

SSIS is logical ... but perhaps it becomes so only after spending a lot of time with it. At some point, the philosophy 'clicks' and after that it becomes your friend.

Phil


Hi Phil,

Sorry for hijacking the thread. had this posted for almost a week without any luck so thought someone from this thread might be able to help.

I was working on an SSIS project in which I need to:

1. Loop through a folder containing multiple text files and get their name into a variable.
2. Append the current system date to that variable so that the variable now contains txtfilename + Date.
3. Create a table in the database with the name as value of the variable.
4. Transfer data of the txt file into the newly created table.


The first two steps I accomplished using a For Each Loop Container and i am able to get the file name into the variable.
The second step I accomplished by just appending GetDate() to the value of the variable.
The third step I accomplished using an Execute SQL task for creating table.

What i am not able to do is get the data into the table with a Data Flow Task.
The problem is that it requires me to give table name as input, which i cannot as the table is being created by the same package dynamically. I need to automate this task so I would always have to create the table dynamically.

Please be patient enough to go through my problem and provide a solution. Thanks a tonne in advance.

PS: I am not very good with C# or other scripting languages so I won't be able to work with a
Scripting task in SSIS. So, please give me a solution other than scripting.


Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1498520
Posted Wednesday, September 25, 2013 10:59 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 4:41 AM
Points: 4,828, Visits: 11,180
Will the tables all have the same DDL?

If not, this is practically impossible to do without C#/VB.NET coding. Unless you decide not to use data flows and instead code the imports using dynamic SQL. But if you go down that path, why not just do everything in a stored proc?



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1498668
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse