Need to create SQL DTS Package

1,725 pts.
Tags:
DTS
SQL
SQL Server 2000
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??
ASKED: January 11, 2008  3:35 PM
UPDATED: February 22, 2008  5:41 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following