Solved

SQL code to perform the functions described in the body of this question

Posted on 2014-04-07
2
173 Views
Last Modified: 2014-04-10
Could somebody help with coding in SQL to perform the following...

check folder - \\cluster\data\Direxxis\Erie\incoming\
if there is a matrix file – eg. Erie_Creative_Matrix_20140403.xlsx
remove the date portion eg. _20140403
copy matrix file without the date portion to \\cluster\data\Direxxis\Erie\incoming\
    - but before changing the file name copy the original eg. Erie_Creative_Matrix_20140403.xlsx to
\\cluster\data\Direxxis\Erie\Archived_Incoming\CreativeMatrix
0
Comment
Question by:tesla764
2 Comments
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 500 total points
ID: 39984271
I would strongly recommend doing this in an SSIS package instead of trying to script it.  Below is a tutorial on how to do that.

http://sqlsaga.com/ssis/how-to-copy-files-from-one-folder-to-another-in-ssis-using-file-system-task/
0
 

Author Closing Comment

by:tesla764
ID: 39992781
Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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…
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.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

760 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

23 Experts available now in Live!

Get 1:1 Help Now