April 11, 2012 at 3:13 pm
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.
-
April 11, 2012 at 3:20 pm
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 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]
April 11, 2012 at 3:33 pm
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