![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Can anyone help with handling nulls or blank data being imported from foxpro .dbf files into a normalized sql database? The data insert tasks are failing because the normalization in sql server requires a value in the incoming data, where this data was optional. Thanks in advance... Frango |
#3
| |||
| |||
|
|
why dont you check something like this IF Trim(DTSSource("columnname")) <> "" Then transform data end if "Frango" <f_gofa (AT) hotmail (DOT) com> wrote in message news:%23PPNUTomEHA.2616 (AT) tk2msftngp13 (DOT) phx.gbl... Can anyone help with handling nulls or blank data being imported from foxpro .dbf files into a normalized sql database? The data insert tasks are failing because the normalization in sql server requires a value in the incoming data, where this data was optional. Thanks in advance... Frango |
#4
| |||
| |||
|
|
Thanks Krish, I am going to try that, its just that I can't seem to find the correct dialog in the DTS designer to accomplish this. If I create a new package using the wizard, I can see where this would occur, but I, so far, have not figured out where the corresponding dialog is accessed in the designer... Frango "Krish" <NOspam (AT) Nospam (DOT) org> wrote in message news:OQekzhomEHA.748 (AT) TK2MSFTNGP15 (DOT) phx.gbl... why dont you check something like this IF Trim(DTSSource("columnname")) <> "" Then transform data end if "Frango" <f_gofa (AT) hotmail (DOT) com> wrote in message news:%23PPNUTomEHA.2616 (AT) tk2msftngp13 (DOT) phx.gbl... Can anyone help with handling nulls or blank data being imported from foxpro .dbf files into a normalized sql database? The data insert tasks are failing because the normalization in sql server requires a value in the incoming data, where this data was optional. Thanks in advance... Frango |
#5
| |||
| |||
|
|
I have a data transformation where the source column is a number value from a comma delimited text file and the destination column is to a SQL table where the field is an integer type that accepts NULL values. Given the example code below I should be able to complete the above transformation. Using the "TEST" option within the ActiveX Script object it works without a single error. However when I attempt to execute the Transformation object of which calls the code below, I get the following error: "...invalid data value for 'Col007' destination column". '************************************************* ******* Function Main() DTSDestination("Col007") = Replace(DTSSource("Col007"), Chr(46), Chr(0)) Main = DTSTransformStat_OK End Function '************************************************* ******* Also I get the same error message if I use "" instead. I cannot seem to find a workaround for what seems to me to be a bug in the DTS. Can anyone offer up a solution? I cannot alter the incoming data prior to the import. |
#6
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |