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
>-----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) >.