Re: Null values

From: Lorettta (anonymous_at_discussions.microsoft.com)
Date: 08/18/04


Date: Wed, 18 Aug 2004 10:35:21 -0700

Hugo,

This helps, thanks much!

-Loretta

>-----Original Message-----
>On Tue, 17 Aug 2004 15:24:44 -0700, Loretta wrote:
>
>>How can I replace null value of a column in a query
>>with something like 'TEST'
>>
>>for eg. if I run the query
>>select contract_num, prodid from product
>>
>>if the contract_num is null, it should return 'TEST'
>>instead of NULL. how can I do so?
>>
>>Thank you,
>>-Loretta
>
>Hi Loretta,
>
>SELECT COALESCE(contract_num, 'TEST')
>
>Best, Hugo
>--
>
>(Remove _NO_ and _SPAM_ to get my e-mail address)
>.
>