Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 19th, 2004, 01:15 PM
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





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you set a column to NULL in a parameter? Aaron Edwards ASP.NET 2.0 Basics 1 April 7th, 2006 11:26 PM
How do you set a column to NULL in a parameter? Aaron Edwards ADO.NET 3 April 7th, 2006 06:26 PM
how to set up system time for SQL 2000 rainman12 SQL Server 2000 1 October 31st, 2005 09:09 AM
how to set up system time as default for SQL 2000 rainman12 SQL Server 2000 0 October 28th, 2005 10:14 PM
How to set Not Null constraint to Null Columns arasu Oracle 1 August 22nd, 2005 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.