[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

How to display 0 in int column as blank

I have table meds contains field act of int type.
The field act which contains 0 and >0 values. How can i display 0 as blank and other values as actual values.
0
searchsanjaysharma
Asked:
searchsanjaysharma
2 Solutions
 
Pratima PharandeCommented:
select case when act >=0 then act else 0 end as act from meds
0
 
Scott Fell, EE MVEDeveloperCommented:
You could cast act as a character and if it is 0 make it ''. But I think this is probably best to do on the front end using your serverside code or or javascript/jquery.
0
 
searchsanjaysharmaAuthor Commented:
tx
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now