Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Data Warehousing
»
Integration Services
»
SSIS- Need File Name which i am loading in...
SSIS- Need File Name which i am loading in Variable
Rate Topic
Display Mode
Topic Options
Author
Message
vax09
vax09
Posted Tuesday, October 09, 2012 1:04 PM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 7:26 AM
Points: 24,
Visits: 293
I Need File Name which i am loading via Excel. Any Idea
Post #1370546
Evil Kraig F
Evil Kraig F
Posted Tuesday, October 09, 2012 2:00 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 12:05 AM
Points: 5,688,
Visits: 6,142
More information as to what you're trying to do, please. That's rather vague.
- Craig Farrell
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions
|
Forum Netiquette
For index/tuning help, follow these directions.
|
Tally Tables
Twitter: @AnyWayDBA
Post #1370572
Koen Verbeeck
Koen Verbeeck
Posted Wednesday, October 10, 2012 12:16 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 2:11 AM
Points: 9,378,
Visits: 6,473
vax09 (10/9/2012)
I Need File Name which i am loading via Excel. Any Idea
Are you using a For Each Loop?
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1370698
jampabsatish
jampabsatish
Posted Wednesday, October 10, 2012 7:26 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, May 20, 2013 8:10 AM
Points: 9,
Visits: 97
Hi
If you are trying to loop through files and load the data and the file name to the target table?
In that case Inside "derived column" toolbox you have Variables and Columns. Just add a derived column, lets say FileName, with the Variable value. When loading table, just map derived column FileName to the table column sourcefileName.
That way it worked for me, If this is not what you are looking for like Evil Kraig F said please elaborate your scenario so you can have better help.
Good Luck!!!
Post #1370917
vax09
vax09
Posted Wednesday, October 10, 2012 9:17 AM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 7:26 AM
Points: 24,
Visits: 293
NO i am just importing excel sheet and i need to use that excel sheet name in one column
Post #1371001
vax09
vax09
Posted Wednesday, October 10, 2012 9:18 AM
Grasshopper
Group: General Forum Members
Last Login: Yesterday @ 7:26 AM
Points: 24,
Visits: 293
i am importing excel file and i want to use the name of excel file in my table
Post #1371002
Koen Verbeeck
Koen Verbeeck
Posted Thursday, October 11, 2012 1:28 PM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 2:11 AM
Points: 9,378,
Visits: 6,473
Does the name of the excel sheet change? I guess not, so you can just use a derived column component that adds a column with the name of the Excel file.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1371750
tmitchelar
tmitchelar
Posted Thursday, October 11, 2012 2:11 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 11:25 AM
Points: 121,
Visits: 414
If the name doesn't change then I would just hardcode the name of the file into a variable and feed that through with a derived column. But I prefer to add a loop around the file extraction data flow and map the result set of your loop to a variable - just in case the name changes.
Post #1371770
Ian C0ckcroft
Ian C0ckcroft
Posted Friday, October 12, 2012 2:26 AM
SSC Eights!
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 4:23 AM
Points: 842,
Visits: 741
Done this before. used a controlling/audit table. Loop through the folder and add the file names to the table. You can have other audit info you might need in the table as well. date, loaded flag etc.
then use this table to load the data.
Ian Cockcroft
MCITP BI Specialist
Post #1371943
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.