1,695 pts.
 Need to create SQL DTS Package
We are using SQL 2000 DTS Packages and I want to create a DTS Package which can copy only all text file names from folder(source) to SQL table column(Destination). Also i want to write number of rows in particular text file to SQL table. DTS or Procedure or Activex Script??

Software/Hardware used:
ASKED: January 11, 2008  3:35 PM
UPDATED: February 22, 2008  5:41 AM

Answer Wiki:
This can be done with with all T/SQL. You can use the xp_dirtree procedure to get the list of files in the directory. Then use bulk insert to load the data into a temp table which you can then use to find the number of records in the table. You can look at this <a href="http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1270919,00.html">tip</a> on SearchSQLServer.com for the syntax of xp_dirtree. Denny
Last Wiki Answer Submitted:  January 11, 2008  6:55 pm  by  Denny Cherry   64,505 pts.
All Answer Wiki Contributors:  Denny Cherry   64,505 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.

 64,505 pts.

 

Were you able to get the solution completed?

 64,505 pts.