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.
Author |
Topic |
akki007
Starting Member
2 Posts |
Posted - 2007-08-02 : 04:49:53
|
Hi all, new here! I have a text file that contains...Person Name 1, DOB 1, Gender 1, Attendance 1Person Name 1, DOB 1, Gender 1, Attendance 2Person Name 1, DOB 1, Gender 1, Attendance 3Person Name 1, DOB 1, Gender 1, Attendance 4Person Name 1, DOB 1, Gender 1, Attendance 5Person Name 1, DOB 1, Gender 1, Attendance 6Person Name 1, DOB 1, Gender 1, Attendance 7I need to append the attendance rows together so I end up with...Person Name 1, DOB 1, Gender 1, Attendance 1+Attendance 2+Attendance 3....Would it be possible to use DTS to import the text file into a table in this new appended format? |
|
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2007-08-09 : 11:29:17
|
You can import into a temp table and then from that temp table you can use the RUN SQL TASKand do the followingInsert into TABLE select personname, DOB, gender, sum(attendence) from temptablegroup by personname, dob, gender.Ashley Rhodes |
|
|
|
|
|
|
|