![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#3
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#4
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#5
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#6
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#7
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#8
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
#9
| |||
| |||
|
|
Newby here: Where do you do VB Transformations in SSIS? Like this??? thanks! '************************************************* ********************* ' Visual Basic Transformation Script ' Copy each source column to the ' destination column '************************************************* *********************** Function Main() DTSDestination("FORM-NUMBER") = DTSSource("Col001") + DTSSource("Col002") + DTSSource("Col003") DTSDestination("FORM-YEAR") = DTSSource("Col001") DTSDestination("WA-JOB-NUM") = DTSSource("Col006") DTSDestination("DISTRICT") = DTSSource("Col007") DTSDestination("WORK-DISTRICT") = DTSSource("Col008") ' DTSDestination("WORK-DATE") = DTSSource("Col009") If IsDate(mid(DTSSource("Col009"),1,4) & "/" & mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2)) then DTSDestination("WORK-DATE") = mid(DTSSource("Col009"),1,4) & "/" & _ mid(DTSSource("Col009"),5,2) & "/" & mid(DTSSource("Col009"),7,2) else DTSDestination("WORK-DATE") = null end if DTSDestination("ACT-PREFIX") = DTSSource("Col010") DTSDestination("ACT-CODE") = DTSSource("Col011") Main = DTSTransformStat_OK End Function |
![]() |
| Thread Tools | |
| Display Modes | |
| |