Solved

How to display 0 in int column as blank

Posted on 2014-03-05
3
205 Views
Last Modified: 2014-03-10
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
Comment
Question by:searchsanjaysharma
3 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 250 total points
ID: 39905988
select case when act >=0 then act else 0 end as act from meds
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 39905996
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
 

Author Closing Comment

by:searchsanjaysharma
ID: 39917573
tx
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to SUM hours for the same record 1 38
PERFORMANCE OF SQL QUERY 13 73
execute a MS SQL script as a schedule SQL job 72 129
Sql Query join multiple table and distinct records 7 30
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question