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
Need some clarification on ESX vs. ESXi vSphere versions
Excel formulas finder
Java newbie - getting going questions!
Find first space in a cell and show all that is on the left of it
SQL Connection error
Kerberos authentication 'sometimes' not working - XP related problem(?)
How can I check a dynamic row of checkboxes if value exists so I enter the row into a db?
Load XML file into sqlserver 2008 Database using c# : 26366040
new features in windows 2003 than windows 2000
mysql upgrade 4.1 to 5.1