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 |
|
uri dimant
Starting Member
16 Posts |
Posted - 2001-05-30 : 06:38:15
|
| I use DTS to Transform Columns into RowsHow can I declare DTS global variable. I look at help and package properties ,it daesn't work.I get error "this object is not supported" Example Source Data File:Role, Name_1, Name_2, Name_3Authors, Neil, Tony, BrucePublishers, GaryReviewers, Darren, PaulExample Destination Table:[Role] [varchar] (20)[Name] [varchar] (20)Results of "SELECT * FROM [dbo].[ColsToRows]":Role Name -------------------- -------------------- Authors NeilAuthors TonyAuthors BrucePublishers GaryReviewers DarrenReviewers Pauldim ColumnCounterDTSGlobalVariables("ColumnCounter").value =1Function Main() DTSGlobalVariables("ColumnCounter") = DTSGlobalVariables("ColumnCounter") + 1 If DTSGlobalVariables("ColumnCounter") <= 4 Then DTSDestination("Role") = DTSSource("Col001") Main = DTSTransformStat_SkipFetch Select Case DTSGlobalVariables("ColumnCounter") Case 2 DTSDestination("Name") = DTSSource("Col002") Case 3 DTSDestination("Name") = DTSSource("Col003") Case 4 DTSDestination("Name") = DTSSource("Col004") End Select Else DTSGlobalVariables("ColumnCounter") = 1 Main = DTSTransformStat_SkipInsert End IfEnd Function |
|
|
|
|
|