View Single Post
  #1 (permalink)  
Old July 19th, 2004, 01:15 PM
ritag ritag is offline
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Null SQL 2000 SmallMoney to Zero

Hi.

I'm using a DTS package to export some SQL data. Within the DTS package I have an ActiveX VBScript that checks for Nulls in columns defined as SmallMoney.

Here's the code:
  DTSDestination("cValue1") = ConvertMoneyNull(DTSSource("Value1"))

  Function ConvertMoneyNull(sValue)
    Dim sStr
    sStr = sValue

    If IsNull(sValue) Then
        sStr = 0
    End If
    ConvertMoneyNull = sStr
End Function

This never worked as "cValue1" still had a value of Null. I read that the monetary data value should be preceded by the currency symbol so I changed "sStr = 0" to "sStr = "$0" but that never worked either.

Any suggestions?

Thanks.

Rita
Reply With Quote