Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Mar 10, 2003

Import Files with Date-stamped Filenames or Paths

By DatabaseJournal.com Staff

MAK [Muthusamy Anantha Kumar]

DTS packages are fantastic features available in SQL Server 7.0 and SQL server 2000. One outstanding feature in the DTS package is the ability to run ActiveX scripts. ActiveX gives us an added advantage in handling many situations; we will discuss how to handle three of these situations.

  1. File-names with date-stamp as a prefix or suffix or root word.

    Eg: \\FileServer\SharedFiles\Bankthree-20030218.txt

  2. File-paths with date-stamp as a prefix or suffix or root word.

    Eg: \\FileServer\SharedFiles\20030218\BankFour.txt

  3. Handling only previous business day date-stamped files

Process Involved

Create Connection to Source files and database.

Give the source file names of SourceFile1 and SourceFile2 to any existing files, for example c:\autoexec.bat. We are going to control the Path of the connections through ActiveX Controls.

Create Transformation between Sourcefiles and Database connections.

Now create two ActiveX scripts, one for each sourcefile.



MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date