I'm working on big SQL need help on grouping nulls as we'll not nulls
From ( select s,g,h.....
from a inner join b on ....
Left outer join
Inner join b
Still lots of joins there
my problem is when grouping I need to get Null & as well not null...but I'm getting only null grouping
when I do group by only null grouping is coming but I need both null and not null grouping please need help
Can't understand completely. In your final select you have a,b,c...sum(). and in the example outpu you show only 2 columns col1 and col2.
can you explain what you mean by null grouping.
is it the group of a, b c.. where all three values are null ?
Sri, there are around 20 fields so I just given example.
Grouping of around 10 fields in which 5 fields are null
col 1 col2 col3 col4 col5 col6 col7 col8 col9 col10
1. 2. 3. 4. 5. N N N N N
1. 2. 3. 4. 5. 126.96.36.199.10
N - null
group by only pulling out null group . I need both null and not null group summary
hope u understand
If it actually omits valid combinations i would consider it a bug.
But you probably do something in your query to produce that result.
Can you share the SQL?