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
Building a Social Network Business Plan (book recommendation / article)
How do I reset the name of the "Title" column in Sharepoint after it has been renamed in error.
Date Extraction (Custom)
Window Server 2003
Some differences between SQL Server 2005 and SQL Server 2008?
Repair lotus notes base
Is there a CChar function in VBA?
Backup Exec 2010 - Hyper-V Remote Agent
IIS7 and FTP is driving me mad. I can login to my FTP Site anon, I can download files but not upload - help??
Exporting Sql Tabel to Excel