Sorry,

Yes, its a stored procedure. I am using a calculation before updating a
table, but I need to make sure the value is not NULL.

I am currently saying

IF @val IS NULL
    SET @val = 0

I just wondered if there was a neater way, as when there is a few variables
it gets a bit messy.







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


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


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


Reply via email to