• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

Change <blank> value in SQL Reporting to 999

I am creating a report using visual studio and I have fields that are blank. In my statement I want to change these blank values to 999. Here is my sample statement.

SELECT GL_CODES
FROM GL_TABLE

What I think:  
SELECT iif(GL_CODES,?,?)
FROM
0
allenkent
Asked:
allenkent
1 Solution
 
ThomasianCommented:
Assuming GL_CODES is numeric:
SELECT ISNULL(GL_CODES, 999)

Open in new window

If GL_CODES is char/varchar:
SELECT CASE WHEN GL_CODES > '' THEN GL_CODES ELSE '999' END

Open in new window

Alternatively you can also change the value of the text box control
=IIF(ISNULL(GL_CODES), '999', GL_CODES)

Open in new window

0
 
allenkentAuthor Commented:
Perfect Answer...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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