Microsoft
Software
Hardware
Network
Question : How do I convert an INT into a VARCHAR or STRING for use in CASE
This is the code,
case when AMV.[Duration] > 0 and AMV.[Comp Code] = 'HOT' then AMV.[Duration] else '' end
Instead of a blank result I get zero because the data type is INT. How do I convert the zero to blank please?
Answer : How do I convert an INT into a VARCHAR or STRING for use in CASE
case when AMV.[Duration] > 0 and AMV.[Comp Code] = 'HOT' then convert(varchar(10),AMV.[D
uration]) else '' end
Now I see. In that case, you need the expression to return a varchar type.
Random Solutions
Large Exchange 03 Server log files
ASP.NET Querystring mystery
how do you export / reuse schema from existing database MS SQL Server 2008?
C# & WMI get mapped shares
Free PHP testing and debugging environment
Accessing MySQL thru VB.NET
show and hide multiple divs using onclick
Domain account with read only permissions
Label is updated, textboxes are not?
SQL Server 2005 Enterprise update query takes too long.