sql server - ISNULL, COALESCE functions -



sql server - ISNULL, COALESCE functions -

how utilize isnull int values, varchar values

select complaint.complaintprofileid,isnull(t2.mmb_id,'notfound') mmbid complaints c bring together t2.. on t2.sno = c.sno

this query gives me error

conversion failed when converting varchar value 'notfound' info type int. mmb_id int

thanks sun

try converting int column varchar,

select complaint.complaintprofileid, isnull(convert(varchar(11), t2.mmb_id), 'notfound') mmbid complaints c bring together t2.. on t2.sno = c.no

sql-server

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -