Jonathan,

Thanks.  Is that considered the "correct" way to do this?  I assume the
IsNull() function is interpreted as "if the first argument is null return
the second argument"?

Using Chris' suggestion worked quite well.

Sum(paymentamt) + 0 AS total

Thanks,
Jim


----- Original Message -----
From: "Jonathan McGuire" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, November 29, 2000 11:28 AM
Subject: RE: MS SQL Shortcut?


> Try
> SELECT ISNULL(SUM(paymentamt),0) as total
>
> Remember, SQL Server returns true nulls.  CF in its infinite wisdom does
not
> support NULL.  When Null is returned, CF converts it to an empty string.
>
> Jonathan McGuire
> VP of Engineering
> Impact Solutions, Inc.
> 704-568-0122
> [EMAIL PROTECTED]
> Smart Automotive Business Solutions
>
> -----Original Message-----
> From: Chris Terrebonne [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 22, 2000 5:26 PM
> To: CF-Talk
> Subject: Re:MS SQL Shortcut?
>
>
> I havn't tested this, but you should be able to do either of the
following:
> SELECT (Sum(paymentamt) + 0) AS total
> or
> SELECT CAST(Sum(paymentamt) AS int) AS total
>
> Chris

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to