My issue: assumed table
id area block basement direction map remarks....more than 90 fields
1 002 Null Y northern Null aaa...
....
I need to put all the fieldname and fieldvalue into another table via id like shown below
id fieldname fieldvalue
1 area 002
1 block Null
1 basement Y
....
and continue,i still have to handle all the data,such as convert fieldvalue's data type and so on
Because my original data get from other component,i cannot use source script component
Any ideas? Regards
seems I need "Public Overrides Sub CreateNewOutputRows()" in transform script component
how can i perform that?
|||
Now,i get CreateNewOutputRows() by creating new output in transform script component
however,how to operate inputed row in that public method?
|||Code below can accomplish my needs
Public Overrides Sub MyAddressInput_ProcessInput(ByVal Buffer As MyAddressInputBuffer)
While Buffer.NextRow()
MyAddressInput_ProcessInputRow(Buffer)
End While
If Buffer.EndOfRowset Then
MyAddressOutputBuffer.SetEndOfRowset()
MySummaryOutputBuffer.MyRedmondCount = myRedmondAddressCount
MySummaryOutputBuffer.SetEndOfRowset()
End If
End Sub
Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)
With MyAddressOutputBuffer
.AddRow()
.AddressID = Row.AddressID
.City = Row.City
End With
If Row.City.ToUpper = "REDMOND" Then
myRedmondAddressCount += 1
End If
End Sub
From msdn
No comments:
Post a Comment