HELP WITH SCRIPT COMPONENET, SSIS
Page 1 of 1
HELP WITH SCRIPT COMPONENET, SSIS
HI,
I HAVE SCRIPT WHICH GIVES ME "AREA 3" INFO IN MY STAGING TABLE. HOWEVER I HAVE REQUIREMENT NOW WHERE I NEED TO INSERT AREA 1 AND AREA 2 FROM BELOW TABLE AS WELL IN THE STAGING TABLE, CAN ANY ONE PLEASE HELP me TO UPDATE THE SCRIPT SO THAT I CAN INSERT AREA 1 AND AREA 2...... I am not sure how to use script component yet and hence i would really appreciate if someone can guide me.
CURRENT SCRIPT IS:
' Process Row 3 - Skip row that has first column with a single space
If currentField.Length = 0 And ColumnNo = 1 Then
Continue While
End If
' Process area3 of regular row if it starts with 2 digits and a space
If currentField.Length > 2 And ColumnNo = 1 Then
If IsNumeric(currentField.Substring(0, 1)) _
And IsNumeric(currentField.Substring(1, 1)) _
And currentField.Substring(2, 1) = " " Then
area3= currentField.Substring(0, 2)
'skip to next column
Continue For
Else
'skip row as not at area 3
RowsSkipped = RowsSkipped + 1
Continue While
End If
End If
Thanks,
Regads
I HAVE SCRIPT WHICH GIVES ME "AREA 3" INFO IN MY STAGING TABLE. HOWEVER I HAVE REQUIREMENT NOW WHERE I NEED TO INSERT AREA 1 AND AREA 2 FROM BELOW TABLE AS WELL IN THE STAGING TABLE, CAN ANY ONE PLEASE HELP me TO UPDATE THE SCRIPT SO THAT I CAN INSERT AREA 1 AND AREA 2...... I am not sure how to use script component yet and hence i would really appreciate if someone can guide me.
CURRENT SCRIPT IS:
' Process Row 3 - Skip row that has first column with a single space
If currentField.Length = 0 And ColumnNo = 1 Then
Continue While
End If
' Process area3 of regular row if it starts with 2 digits and a space
If currentField.Length > 2 And ColumnNo = 1 Then
If IsNumeric(currentField.Substring(0, 1)) _
And IsNumeric(currentField.Substring(1, 1)) _
And currentField.Substring(2, 1) = " " Then
area3= currentField.Substring(0, 2)
'skip to next column
Continue For
Else
'skip row as not at area 3
RowsSkipped = RowsSkipped + 1
Continue While
End If
End If
Thanks,
Regads
sssqllearner- Posts : 8
Join date : 2014-09-16
Similar topics
» ETL Fact Load in SSIS
» Looking for suggestions on ETL tools for DW/BI Project
» SCD object in SSIS
» SSIS newbie
» SSIS SCD Component
» Looking for suggestions on ETL tools for DW/BI Project
» SCD object in SSIS
» SSIS newbie
» SSIS SCD Component
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum