?
Solved

Ssis: connecting to a Ole Db with a dynamic table name..

Posted on 2010-03-23
2
Medium Priority
?
795 Views
Last Modified: 2013-11-10
My SSIS is createing a table in a SQL database monthly with the yearmonth as part of it's name, I want to load data into it.. So I in data flow I created my source, and then my oleDb destination.. But the Connection Manager for the Ole DB is just to get to the database.. Fine..
the destination want you to point & click on the table.. then I see no expression area to change that table into a variable name...
I need the "name of table or view" in the Ole Db destination editor to be
filename_201003  this month
filename_201004 next month

the filename has been formatted into a variable and is ready to use! Now it's just getting this component to use it..
How can I do that?
0
Comment
Question by:moosetracker
2 Comments
 
LVL 30

Accepted Solution

by:
Reza Rad earned 2000 total points
ID: 28380657
Hi,
There is no need to use expressions,
OLEDB source and destinations has another method for dynamic table names,
double click on oledb destination,
set Data Access Mode as Table Name or View Name from Variable,
this is obvious that you should set the value of variable with a script before,

Regards,

0
 
LVL 1

Author Closing Comment

by:moosetracker
ID: 31706284
Thank you so much..
Yes, this was a "duh" moment on my part.. Geesh.. Now I got all this code that was creating shell generic name table, then renameing it to what I want, and recreateing a shell generic file so the destination table wouldn't abort on the next run...
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

589 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