![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| DTS doesnt like my syntax for various reasons. Im trying to go from an Excel file to an sql table. If there are only 4 digits, I want to add a "0". If not, just do a regular import. Ive added comments so everyone know what line is really where since wrapping is occuring here. ' Copy each source column to the destination column Function Main() if len(DTSSource("machine_placement_id")) = 4 then DTSDestination("StoreNbr") = "0" & DTSSource"machine_placement_id") else DTSDestination("StoreNbr") = DTSSource("machine_placement_id") -- line 8 end if Main = DTSTransformStat_OK End Function Expected End. Error on line 8. -- SQL2K SP3 TIA, ChrisR |
#3
| |||
| |||
|
| DTS doesnt like my syntax for various reasons. Im trying to go from an Excel file to an sql table. If there are only 4 digits, I want to add a "0". If not, just do a regular import. Ive added comments so everyone know what line is really where since wrapping is occuring here. ' Copy each source column to the destination column Function Main() if len(DTSSource("machine_placement_id")) = 4 then DTSDestination("StoreNbr") = "0" & DTSSource"machine_placement_id") else DTSDestination("StoreNbr") = DTSSource("machine_placement_id") -- line 8 end if Main = DTSTransformStat_OK End Function Expected End. Error on line 8. -- SQL2K SP3 TIA, ChrisR |
![]() |
| Thread Tools | |
| Display Modes | |
| |