Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Creating Individual Text Files for Each Identifier

Author  Topic 

dmcknight5
Starting Member

8 Posts

Posted - 2008-08-22 : 14:24:53
Evening All

I have a sp that creates my main table, but for space sake lets just take three columns from my final table.

Example
Table_A
school id_num name
A 123456 Jane
A 777777 Jan
B 123455 John
B 666666 Johnny
C 236521 Joshua
C 555555 Joanne

Desired result set:
I need to transfer this data to another server for each school creating a text file for each school in a chosen directory.
There's about 40 schools in this table which comprises about 27000 records. My current DTS package has about 40 tranformation tasks for each file, and I know it has to be a better way to loop through my table creating a file for each indentifier through a DTS package.

Please advise.



webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-22 : 15:01:00
This is not exactly what you want but it can be your start to understand how to get a loop in DTS 2000.
I think you're not an absolute beginner using dts.
http://www.sqldts.com/246.aspx

Webfred

Planning replaces chance by mistake
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-23 : 02:51:02
what would text file contain? Will it be similar in structure for each school?
Go to Top of Page

dmcknight5
Starting Member

8 Posts

Posted - 2008-08-25 : 12:00:30
Thanks webfred....and yes visakh16...it will be the same structure for each school. The file has about 14 columns and it's simply parsed by each unique school.

Go to Top of Page
   

- Advertisement -