locked
Omit 0 value in colomns RRS feed

  • Question

  • User-1155576298 posted

    PLZ Help !!

    M using sql server 2005 & want to display result as

    colmn1     colmn2     colmn3     colmn4

    asd             0001          500          Ram

    dsa             0002          600          Singh

    dsa             0002          600          Singh

    But my query is generating result ie: returning 0 value in colmn3 but m need to display data like colmn3 value>0

    colmn1     colmn2     colmn3     colmn4

    asd             0001          500          Ram

    gtr             0001          0               Ram

    qwe           0001          0               Ram

    dsa            0002          600          Singh

    rtr              0002          0              Singh

    ewe            0001          500          Ram

    Any help!!

    Thanks in advance

    Wednesday, September 21, 2016 6:53 AM

Answers

  • User269881539 posted

    Just add to your query :

    WHERE colmn3 > 0

    or if you already have a WHERE clause

    AND colmn3 > 0

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 21, 2016 2:52 PM