[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

Convert DTS Transformation script into SSIS

Hi,

I am looking at VB script that looks like the following:


Is there a SSIS task that handles like that?
Dim cr_id, tohr, fromhr, record, WeightCalc
	record = DTSSource("record")
	if rtrim(mid(record, 129,12)) = "" then 
		record = mid(record, 1,128) + "000000000000" + mid(record, 141)
	end if
	if rtrim(mid(record,47,8)) = "" then  
		record = mid(record, 1,46) + "00000000" + mid(record, 55)
	end if
	If rtrim(mid(record,85,8)) = "" then 
		record = mid(record, 1,84) + "00000000" + mid(record, 93)
	end if 
	If rtrim(mid(record,97,8)) = "" then
		record = mid(record, 1,96) + "00000000" + mid(record, 105)
	end if

Open in new window

0
yechan
Asked:
yechan
2 Solutions
 
JestersGrindCommented:
Try using an ActiveX Script task.

http://technet.microsoft.com/en-us/library/ms137525.aspx

Greg

0
 
Reza RadCommented:
you can do all of these within Data Flow task with Derived Column Transform or with Script Component,
if you could tell us sample input data rows and sample desired output and we will help you to implement it in SSIS
0
 
yechanAuthor Commented:
Hi reza_rad,

thanks for your input.  I think I am going to try to implement this with a "Script Component".  The sample code above is a small snapshot of a 15 page script.  Thank you.  HOpe it's ok if I split the points.  I have the feeling I will be quite a bit here for next week or so =)
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now