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
|