Groups | Blog | Home
all groups > sql server mseq > august 2004 >

sql server mseq : Null values


Loretta
8/17/2004 3:24:44 PM
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,
Hugo Kornelis
8/18/2004 12:39:42 AM
[quoted text, click to view]

Hi Loretta,

SELECT COALESCE(contract_num, 'TEST')

Best, Hugo
--

Lorettta
8/18/2004 10:35:21 AM
Hugo,

This helps, thanks much!

-Loretta

[quoted text, click to view]
AddThis Social Bookmark Button