how do you create place values for columns that may not have values in them

  • Currently, my sql statement retrieves values for only two of possibly four values, therefore it creates only two rows with seperate counts. But I need rows for the 3rd and 4th values showing zeros ie '0'.

    How do you do that without using a pivot? I need this so that when I import into excel, columns are created.

    -

  • Is this related to http://www.sqlservercentral.com/Forums/Topic1281810-392-1.aspx "how to sum up instances only 3 of the 4 values that can occur in a given column"

    If so it will be better to keep that thread going. if not can you post sample data and DDL for your tables you are asking about. with out that you are asking us to solve for x but not giving us any thing to work with.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • ok capn. hector I did that. That is also my post.

    -

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

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