That does the trick.

Cheers


----- Original Message ----- 
From: "Rich Wild" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 13, 2002 11:42 AM
Subject: RE: [ cf-dev ] val() in MS SQL Server?


> there's a T-SQL function called isNull:
> 
> ISNULL (T-SQL)
> Replaces NULL with the specified replacement value.
> 
> Syntax
> ISNULL(check_expression, replacement_value)
> 
> Arguments
> check_expression 
> Is the expression to be checked for NULL. check_expression can be of any
> type. 
> replacement_value 
> Is the expression to be returned if check_expression is NULL.
> replacement_value must have the same type as check_expresssion. 
> Return Types
> Returns the same type as check_expression.
> 
> Remarks
> The value of check_expression is returned if it is not NULL; otherwise,
> replacement_value is returned.
> 
> 
> > -----Original Message-----
> > From: Andy Hall [mailto:[EMAIL PROTECTED]]
> > Sent: 13 August 2002 11:50
> > To: [EMAIL PROTECTED]
> > Subject: [ cf-dev ] val() in MS SQL Server?
> > 
> > 
> > Hi,
> > 
> > Can anyone tell me the best way to replicate the val() 
> > coldfusion function in MS SQL Server 7?
> > 
> > I need to convert NULL values to 0, and although I can do the 
> > IF val IS NULL then SET val = 0 I just wondered if there was 
> > a neater way to do it.
> > 
> > I have tried CAST(val as FLOAT) and convert, but neither worked.
> > 
> > Thanks in advance
> > 
> > Andy Hall.
> > 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


Reply via email to