update mytable set mycol = 0
WHERE mycol IS NULL

??

is this what you mean, or are you talking about within an SP or something?



> -----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]


Reply via email to