Solved

Clear a table depending on a file name

Posted on 2009-03-30
7
251 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

710 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