Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimize this SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01199356
Message ID:
01199502
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform