all groups > sql server dts > august 2005 >
You're in the

sql server dts

group:

DTSTransformStat_SkipRow is failing when testing value with ISNULL


DTSTransformStat_SkipRow is failing when testing value with ISNULL ATJaguarX
8/31/2005 2:22:56 PM
sql server dts:
I have column in the destination table that does not allow nulls. I
have a lookup table to grab an item's ID. If the item doesn't exist, I
simply want to skip this row. Sounds simple, but I've been pulling my
hair out for the past two days on it. No matter what I do, I cannot
trap the null and skip the row, yet it always fails, telling me that
it's trying to insert a null into the field.

ANY HELP would be GREATLY APPRECIATED.

Here is my code...

Function Main()

Dim SKUID

SKUID = GetCatalogSKUID(DTSSource("color"))

if ISNULL(SKUID) then
Main = DTSTransformStat_SkipRow
else
DTSDestination("CatalogSKUID") = SKUID
Main = DTSTransformStat_OK

end if

End Function

Function GetCatalogSKUID(prvSKU)

prvSKU = trim(prvSKU)

GetCatalogSKUID = DTSLookups("CatalogSKUs").Execute(prvSKU)

End Function
Re: DTSTransformStat_SkipRow is failing when testing value with ISNULL ATJaguarX
8/31/2005 2:58:19 PM
isnothing seems to do the trick.
AddThis Social Bookmark Button