Link to home
Start Free TrialLog in
Avatar of MAXcom
MAXcom

asked on

QuickReport Question (SQL Also)

Hi,
I need to create a report and heres the problem and what needs to be done:

I have a database of items we shipped.
There is a main id which is by customer and under that there are item ids. for every item there is a cost. the main number is how the tables are linked. I have whriten an sql which successfully lists all the clients and items chipped for a day but now I need an option to make a filter for the Query that would select all the clients and all the item ids
where the total cost for ALL the item ids under the customer is <= 0.

Heres what it should look like in the end

Client/Item ID                 Date         Price
1234567
         01234567              ../../..     00.00
         12345678              ../../..     00.00

The filter MUST exclude all the client ids that have the sum of all the item ids totalling >0.2.

My current filter, for some reason, works but the problem is that it does exclude all the itemid's without the right price BUT it doesnt exclude the other ids associated with that client or the client id itself.

Please Help as This is VERY urgent.
If you need more info,
Please E-Mail me at:
maxcom@interserv.com
Avatar of d4jaj1
d4jaj1

Whom ever answers this question, please take a look at a very simular question dated 9/, since I think the answer would apply to both questions.  MAXcom, I hope you don't mind me piggy-backing on your question, but I think the questions are the same and I need an answer really fast also.
Hi MAXcom,

I think you have to tell us which tables you have and how they  look likes.

/pivar
ASKER CERTIFIED SOLUTION
Avatar of dionysos_swamp
dionysos_swamp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MAXcom

ASKER

Thanks,
Even though the sql you gave me didnt work by converting it straight to the real tables, it did get me on the right track.
MAXcom
maxcom@interserv.com
Glad to have been of service.