Member of the LearnItFirst.com Video Training Network | LearnSqlServer.com | SQL SSIS Training | SQL Programming Tutorials |
LearnSqlServer.com Forums LearnSqlServer.com
Welcome Guest Search | New Posts | Members | Log In | Register

ftp task Options
dibyant
Posted: Monday, January 21, 2008 1:55:57 PM
Rank: Newbie

Joined: 1/21/2008
Posts: 9
Points: -73
Location: usa
Comments: dear sir,Mr. Scott sir
Sir,i have a problem with the SSIS ,i am
telling a scenario like i am using FTP TASK to load the different source
file but once i am done with done loading the file how i will know like i
have already processed that particular file(s), is there any way to do that.
like i want to load the files since i have a lots of file to process but
once i am done loading one file or more how i will know like i have already
process that file. please sir, if possible reply me back as soon as
possible. with high regards dibyant upadhyay
Role: Guest
Scott Whigham
Posted: Monday, January 21, 2008 2:06:44 PM


Rank: Super Mod

Joined: 3/20/2006
Posts: 345
Points: 748
Location: Dallas, TX
Are all of your files in the same folder? If so, I would use a Foreach Loop Task and store the file name in a variable. You will not process the same file twice during one iteration. If you are concerned that you will process the same file again at a later date, store the file details in a SQL table - something like
Code:
CREATE TABLE FilesProcessed (
   LineId INT NOT NULL IDENTITY(1,1) PRIMARY KEY
   , FileName SYSNAME
   , AddDate DATETIME --- default to GETDATE()
   , FileSizeAtLoadTime -- in case you want to know
   , PathToFile SYSNAME -- in case you need the full path to the file later
)
Now, as you do your iteration through the files in the folder, check to see if the file exists already in your table. If not, load it up!

Does this help?
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
     
Don't Forget!
LearnItFirst.com
Don't Forget!
LearnWindows2003.com
 
Home | About Us | Support | Contact Us | Privacy | Site Map | Blogs Blogs Refer a Friend and Get a Free Subscription!
© Copyright 2004-2007 LearnItFirst.com LLC. All rights reserved. All trademarks remain the property of their respective owners.
This site is not affiliated in any way with the Microsoft Corporation.