Nothing wrong about your query, unless this part:
[pre]
AND WKLY_SLS_Q 0
[/pre]
Which I suspect should be:
[pre]
AND WKLY_SLS_Q eq 0
[/pre]
But it could be a typo.
Everything else should work has supposed.
I'm also assuming that, although you are not keeping COST_A, it does exists in work.STORE_SLS and is necessary to group the variables.
Cheers from Portugal.
Daniel Santos @ www.cgd.pt
... View more