Solved

Clear a table depending on a file name

Posted on 2009-03-30
7
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.

626 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