+ Reply to Thread
Results 1 to 4 of 4

Thread: Converting Null Values to Zero

  1. #1
    Barn Regular nboscaino is an unknown quantity at this point nboscaino's Avatar
    Join Date
    Jul 2008
    Location
    Philadelphia, PA
    Posts
    97
    Rep Power
    4

    Converting Null Values to Zero

    Trying to change null data to zero using an iif statement.

    ultimately what I am trying to do is have a current readout of the amount that is in a checking account.

    I am trying to do this using select queries. There are 4 catagories. Expenses, Income, Transfer In, Transfer Out

    I made 4 queries to find those catagories totals and they are:

    QryPriChkgExpTot
    QryPriChkgIncTot
    QryPriChkgTranInTot
    QryPriChkgTranOutTot

    I found that in my dummy data that I neglected to put a transfer in and so when I ran that query it continues to come empty. Consequently anything i run using that data doesnt treat it as 0 so further down the line I get an empty as well. I tried to handle this with an iif statement and it doesnt work. Any suggestions

    particularlly pay attention to QryPriChkgTranInTot and see how it doesnt have a value when run. I considered this to be a null. Am I mistaken?
    Attached Files

  2. #2
    Barn Newbie RuralGuy will become famous soon enough RuralGuy's Avatar
    Join Date
    Mar 2008
    Posts
    44
    Rep Power
    4

    Just use the Nz() function.

  3. #3
    Barn Regular nboscaino is an unknown quantity at this point nboscaino's Avatar
    Join Date
    Jul 2008
    Location
    Philadelphia, PA
    Posts
    97
    Rep Power
    4

    with such a strong approval of the Nz funct ill have to most certainly do that. I hope the help on it is somewhat complete. Thanks guys

  4. #4
    Barn Newbie RuralGuy will become famous soon enough RuralGuy's Avatar
    Join Date
    Mar 2008
    Posts
    44
    Rep Power
    4

    Just post back here if you need more assistance. Pleanty of people willing to help.

+ Reply to Thread

Similar Threads

  1. Conversion failed when converting the varchar error
    By guddu in forum Microsoft SQL Server
    Replies: 9
    Last Post: July 17th, 2008, 12:08 PM
  2. finding values
    By todd2006 in forum ASP Development
    Replies: 2
    Last Post: June 23rd, 2008, 03:03 AM
  3. retrieve values
    By todd2006 in forum SQL Development
    Replies: 5
    Last Post: June 19th, 2008, 02:46 PM
  4. Replies: 8
    Last Post: June 17th, 2008, 10:39 AM
  5. Return Default Date If Null
    By jmurrayhead in forum SQL Development
    Replies: 16
    Last Post: June 8th, 2008, 11:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO