Solved

Clear a table depending on a file name

Posted on 2009-03-30
7
242 Views
Last Modified: 2013-11-10
I  have  a  execute  process task that runs a scipt and gets files from a  site
it gets the files and  puts  them in a folders in  local system. The file name is some thing like this
xyz_date(xyz_033009).now my task is once the file is in a local folder and if file name is not todays date ,i mean file name which has date in it is not  todays date i have to do nothing. If  file date has todays date  then i have to clear a table. How  can i do this
0
Comment
Question by:svs1919
  • 4
  • 3
7 Comments
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24020016
Check the attached file...
let me know if it helps you!
You need to customize your script in order to resolve your issue!
Regards,
pedro

www.pedrocgd.blogspot.com
Post-SSISEX01.doc
0
 

Author Comment

by:svs1919
ID: 24020190
So i have to use a script task after this execute process tasK. Can any one help me with this as i am not  a .net ot  java person
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24020434
You have Process task to copy files to folders in  local system, correct?
use ForEach Loop to read each of this file...
Add a script to inside ForEach Loop... inside script set the status of the work to do after this task in a SSIS variable...
Check the doc file...
helped?
regards,
Pedro
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:svs1919
ID: 24022132
i tried but i am unable to get it in for loop container how do i how can search for the with extension todays date. do i have to write it in script task
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 24027482
Use a script task, and inside .net code...
helped?
0
 

Author Comment

by:svs1919
ID: 24029183
yes it did but a small problem the file name that  i am looking for has a date extension. I am trying to put that file name in the variable and its not working i am struck with that point.
i ahve to look for a file some thing like this xyz_date(xyz_033109) to get this working in one of the variables that looks for the  file i gave the name as
xyz_+RIGHT("0" + (DT_STR, 2, 1252)  MONTH( GETDATE()  ), 2) + RIGHT("0" + (DT_STR, 2, 1252)  DAY( GETDATE()  ), 2) + RIGHT((DT_STR, 4, 1252)  YEAR( GETDATE()  ),2) + .xls

but its not working how can i fix this. Can i declare some thing like this in a variable?
0
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 24030931
Check the attached package that I made to other question.
Helped?
regards,
Pedro
www.pedrocgd.blogspot.com

SSIS-Interface.JPG
testfile-120109.xls
testfile-140109.xls
Package-EE75-dtsx.txt
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSRS ReportViewer report timeout 7 101
VB6 ListBox Question 4 32
T-SQL:  Why can you not SUM on a CASE statement, for crying out loud? 2 29
Sql Query 4 14
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now