Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need your help once more. thanks in advance for your time.
I have 2 tables Table A (work orders) and Table B (tasks related to work orders). Table A has a primary key IdA which is also a field in Table B. A work order in Table A can have 0 to N tasks in Table B. If a work order doesn't have any task yet, its IdA won't be found in Table B.
What I'm trying to do is a bar chart to show how many tasks are assigned to every work order in Table A, including those work orders with 0 tasks. My problem is that my bar chart is showing work orders withs tasks assigned, but those work orders with 0 tasks are hidden.
Any idea?
Thanks
Regards.
@agbcn can you share sample data with expected output?
Hi Kush,
Thanks for your reply. I'm gonna try to give a very simple example:
Table A (Work Orders)
IdA IdCustomer
1 Cust1
2 Cust1
3 Cust2
4 Cust3
Table B (Tasks Related to Orders)
IdB IdA Task
1 1 Task1
2 1 Task2
3 1 Task3
4 2 Task4
5 2 Task5
6 3 Task6
As you can see, Work Order with IdA=4 exists in Table A but none Tasks are assigned in Table B yet.
I need a bar chart to show how many Tasks are needed for every Work Order. My current solution provides the following result:
Work Order 1 ---> 3 Tasks
Work Order 2 ---> 2 Tasks
Work Order 3 ---> 1 Task
However, I'd like to get:
Work Order 1 ---> 3 Tasks
Work Order 2 ---> 2 Tasks
Work Order 3 ---> 1 Task
Work Order 4 ---> 0 Task
Hope that helps. If you need further info, pleaase let me know.
Thank you very muc.
Regards