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
Replace file with a batch file
stage.focus Error
Trying to optimize my VBA Code - help with syntax
A lot of clients are not chown on the console in WSUS. The logs on the clients show the updates are being received and installed and its all installing fine. Just the console cannot see these computer
How do you set the scope of a datasource in a jython script?
Win 7 x64 & Dell 2330dn - Network Printing Problems
How do I run rsync without it hogging resources?
Javascript to force a "scroll to the top of page" upon page load
open window fitting an image
Outlook stationery, multiple BCC recipients, spam filters