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 |
|
victord
Yak Posting Veteran
64 Posts |
Posted - 2002-06-17 : 08:59:56
|
| Dear Folks,I am trying to export a table from SQL server 7 to a text file. But this is proving really dificult. I mean it is prety straight forward to export to a text file, but in this particular scenario i have to do some transformation of the data before it gets to the text file.1, The data must have no space between them.2, The data or row is seperated by a plus and not a comma or space etc.3, Basically the data must appear on text as a long string of text with no spaces between them.Below is a copy of the file i have to transform before it gets to the text file. Please help.' Visual Basic Transformation Script' Copy each source column to the' destination column'************************************************************************Function Main() DTSDestination("Barcode") = DTSSource("Barcode") DTSDestination("Borrower_Type") = DTSSource("Borrower_Type") DTSDestination("Planned_Finish_Date") = DTSSource("Planned_Finish_Date") DTSDestination("Campus_code") = DTSSource("Campus_code") DTSDestination("Coll_sgen2") = DTSSource("Coll_sgen2") DTSDestination("004") = DTSSource("004") DTSDestination("Surname") =RTRIM (DTSSource("Surname")) DTSDestination("Title") = DTSSource("Title") DTSDestination("Forename") = DTSSource("Forename") DTSDestination("040") = DTSSource("040") DTSDestination("College Address1") = DTSSource("College Address1") DTSDestination("College Address2") = DTSSource("College Address2") DTSDestination("College Address3") = DTSSource("College Address3") DTSDestination("College Address4") = DTSSource("College Address4") DTSDestination("mailto:E-mail address") = DTSSource("mailto:E-mail address") DTSDestination("055") = DTSSource("055") DTSDestination("056") = DTSSource("056") DTSDestination("057") = DTSSource("057") DTSDestination("058") = DTSSource("058") DTSDestination("Institution_Id") = DTSSource("Institution_Id") DTSDestination("Term Address1") = DTSSource("Term Address1") DTSDestination("Term Address2") = DTSSource("Term Address2") DTSDestination("Term Address3") = DTSSource("Term Address3") DTSDestination("Term Address4") = DTSSource("Term Address4") DTSDestination("064") = DTSSource("064") DTSDestination("Term Postcode") = DTSSource("Term Postcode") DTSDestination("Term Phone No") = DTSSource("Term Phone No") DTSDestination("067") = DTSSource("067") DTSDestination("068") = DTSSource("068") DTSDestination("Institution_Id2") = DTSSource("Institution_Id2") DTSDestination("Home Address1") = DTSSource("Home Address1") DTSDestination("Home Address2") = DTSSource("Home Address2") DTSDestination("Home Address3") = DTSSource("Home Address3") DTSDestination("Home Address4") = DTSSource("Home Address4") DTSDestination("074") = DTSSource("074") DTSDestination("Home Postcode") = DTSSource("Home Postcode") DTSDestination("Home Phone No") = DTSSource("Home Phone No") DTSDestination("077") = DTSSource("077") DTSDestination("078") = DTSSource("078") DTSDestination("079") = DTSSource("079") DTSDestination("Course") = DTSSource("Course") DTSDestination("Institution_Id3") = DTSSource("Institution_Id3") DTSDestination("Planned_Start_Date") = DTSSource("Planned_Start_Date") DTSDestination("100") = DTSSource("100") DTSDestination("110") = DTSSource("110") DTSDestination("student_id") = DTSSource("student_id") Main = DTSTransformStat_OKEnd Function |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-17 : 09:30:04
|
quote: But this is proving really dificult.
You're gonna need to post what exactly isn't working.<O> |
 |
|
|
|
|
|