I need some help formulating a query for the following situation:
I have a database that tracks service calls. There are a number of tables, of which
I'm primarily interested in getting info from three of them:
WORKORDER TABLE
workorder_number
customer_number
workorder_date
misc other fields
PARTS TABLE
part_number
part_description
workorder_number
LABOR TABLE
workorder_number
time_spent
for each workorder, there can be multiple parts records and labor records. Given a customer number
and a date range, how can I get the workorder info, along with all of the parts and labor records
associated with that workorder? This is probably straightforward to most of you gurus, but most
of my experience has been with simple joins, in which there would only be one record in each of the
table that matches. Thanks in advance.
nick bulka
I have a database that tracks service calls. There are a number of tables, of which
I'm primarily interested in getting info from three of them:
WORKORDER TABLE
workorder_number
customer_number
workorder_date
misc other fields
PARTS TABLE
part_number
part_description
workorder_number
LABOR TABLE
workorder_number
time_spent
for each workorder, there can be multiple parts records and labor records. Given a customer number
and a date range, how can I get the workorder info, along with all of the parts and labor records
associated with that workorder? This is probably straightforward to most of you gurus, but most
of my experience has been with simple joins, in which there would only be one record in each of the
table that matches. Thanks in advance.
nick bulka