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

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -