Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How can use mapping in SSIS using Script in SSIS Expand / Collapse
Author
Message
Posted Wednesday, May 16, 2007 4:08 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 14, 2009 7:14 AM
Points: 10, Visits: 21

This example i have in my DTS package..

Function Main()
 DTSDestination("DATA")=YEAR(DATE) & "-" & RIGHT("0" & TRIM(CSTR(MONTH(DATE))), 2) & "-" & RIGHT("0" & TRIM(CSTR(DAY(DATE))), 2)
 DTSDestination("BDNCAR") = DTSSource("BDNCAR")
 DTSDestination("BDSITU") = DTSSource("BDSITU")
 DTSDestination("BDMSIT") = DTSSource("BDMSIT")
 DTSDestination("BDDTEM") = DTSSource("BDDTEM")
 DTSDestination("BDDTEX") = DTSSource("BDDTEX")
 DTSDestination("BDDTUU") = DTSSource("BDDTUU")
 DTSDestination("BDDSIT") = DTSSource("BDDSIT")
 DTSDestination("BDNVUS") = DTSSource("BDNVUS")
 DTSDestination("BDNOM1") = DTSSource("BDNOM1")
 DTSDestination("BDRCLI") = DTSSource("BDRCLI")
 DTSDestination("BDNCLI") = DTSSource("BDNCLI")
 DTSDestination("BDNATR") = DTSSource("BDNATR")
 DTSDestination("BDNSEQ") = DTSSource("BDNSEQ")
 DTSDestination("BDRCAR") = DTSSource("BDRCAR")
 DTSDestination("BDMOED") = DTSSource("BDMOED")
 DTSDestination("BDTANU") = DTSSource("BDTANU")
 DTSDestination("BDANUI") = DTSSource("BDANUI")
 DTSDestination("BDTEMI") = DTSSource("BDTEMI")
 DTSDestination("BDCCAS") = DTSSource("BDCCAS")
 DTSDestination("CMBDCLCP") = DTSSource("CMBDCLCP")
 DTSDestination("BDCPRD") = DTSSource("BDCPRD")
 DTSDestination("BDCCPR") = DTSSource("BDCCPR")
 Main = DTSTransformStat_OK
End Function

I have to change and remake this package(dts) using SSIS package..pLease can any one tel me how can i solve this problem.

how can i create this kind of mapping in my SSIS project??

thank you dilsa

Post #366255
Posted Wednesday, May 16, 2007 7:30 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 9:19 AM
Points: 1,046, Visits: 2,739

Dilsa,

It looks like this is a fairly simple mapping, with only the first value requiring any manipulation before going to the destination.  I would use a Derived Column task to send the new value you call "DATA" to the destination.  You don't need to script this kind of task in SSIS.

hth
Tim





Tim Mitchell, SQL Server MVP
Independent Business Intelligence Consultant
www.TimMitchell.net
@Tim_Mitchell

Post #366339
Posted Tuesday, August 28, 2012 6:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 28, 2012 6:50 PM
Points: 4, Visits: 3
Yes very true......
This seems to be a like a very simple mapping. Just create a DataFlow task. Define a source and a destination and have a derived col transform in between. On the dest connection, map based on the specs you have in the old DTS package.

Post #1351346
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse