>Hi Borislav,
>
>I just did this (obviously simple) query using the default PUBS database from SQL server to simulate what you are doing... although I'm only using 2 fields...
>
>
>select stor_id,
> sum( case qty when 25 then qty else 0 end) as Qty25,
> sum( case qty when 15 then qty else 0 end) as Qty15
> from sales
> group by stor_id
> order by stor_id
>
>
>and it properly will show up with a single row when both case qty conditions exist. This leads me to think that some of the other fields MAY have some WHITESPACE characters making the group by fail/create multiple rows... almost like
>
>C_Cod_Art =
>"AAAA"
>and
>"AAAA "
>
>if so, you might want to see if that's a possibility.
>
>Don
>
>
Hi Don,
I think you answered the wrong person <g> Borislav didn't start this thread, he was just trying to help.
If it's not broken, fix it until it is.
My Blog