Solved

Clear a table depending on a file name

Posted on 2009-03-30
7
237 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

705 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

16 Experts available now in Live!

Get 1:1 Help Now