Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Location
    Stalybridge, Manchester
    Posts
    273

    Unanswered: Return Null Value as Zero

    In this code below I want all the rows in the WL_Ranges field Weeks Range Title to show in order of Weeks Range. Using this query below it always just returns a value when it greater than zero, how can I get it to show all returns regardless is zero or not?

    Code:
    SELECT     TOP (100) PERCENT jez.WL_RANGES.[weeks range title], COUNT(jez.WL_DATA.[Weeks Range]) AS Expr1
    FROM         jez.WL_DATA RIGHT OUTER JOIN
                          jez.WL_RANGES ON jez.WL_DATA.[Weeks Range] = jez.WL_RANGES.[weeks range]
    WHERE     (jez.WL_DATA.[Waiting List Name] = 'PVL') AND (jez.WL_DATA.Month = 'September') AND (jez.WL_DATA.Year = '2008') AND 
                          (jez.WL_DATA.[Generated Date] = CONVERT(DATETIME, '2008-09-29 00:00:00', 102)) OR
                          (jez.WL_DATA.[Waiting List Name] IS NULL)
    GROUP BY jez.WL_RANGES.[weeks range title], jez.WL_RANGES.[weeks range]
    ORDER BY jez.WL_RANGES.[weeks range]
    Where am I going wrong??

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    COALESCE? this message is too short.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Apr 2007
    Posts
    183

Posting Permissions

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