• T oanswer your original question: use ISNULL(NAME2,'0').

    Please note that you should use consistent data types (not an integer to replace a varchar value).

    But the much more important issue you should worry about is the general design of the query:

    Why do you use subqueries against the very same table again to select different columns instead of a single join to this table?

    I strongly recommend a complete redesign of the query.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]