Rows returned with null values in a criteria field.

  • Ok, so I have an issue.

    There is a table that has a status field on it.

    When I query that status field for a particular code, it returns all the records with that status code and some null records as well.

    My SQL is a simple as this though:

    SELECT Status_Code, Object

    FROM TABLE

    WHERE Status_Code = "M";

    I still get some records that have a status_code of NULL.

    Also, in the results window, this column is yellow, while the others are white.

    It is SQL 2005 Enterprise.

    Any ideas?

  • The double quotes might be messing you up. Use single quotes.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply