M
Maury Markowitz
Here's my table...
ticketId partId part
10 105 gizifas
10 106 whatzits
10 107 thingamabobs
11 108 dohickies
Sadly, partId is the primary key (as you might have guessed) and is the only
thing being stored in many other tables.
I have a report that gathers up each ticket thus...
SELECT * from tblTickets WHERE partId IN
(select min(partId) from tblTickets group by ticketId)
That works great. The problem is I need to have a subreport that shows all
the parts of the ticket. Now this would be easy if the other tables had the
ticketId, I'd just "join" on that. But the other table doesn't have the
ticketId, only the partId (it's a table tracking auditing information, every
change to every part).
Can anyone suggest a way to do this? I can do it in raw SQL easily enough,
but I simply don't know how to make a report that uses it.
Maury
ticketId partId part
10 105 gizifas
10 106 whatzits
10 107 thingamabobs
11 108 dohickies
Sadly, partId is the primary key (as you might have guessed) and is the only
thing being stored in many other tables.
I have a report that gathers up each ticket thus...
SELECT * from tblTickets WHERE partId IN
(select min(partId) from tblTickets group by ticketId)
That works great. The problem is I need to have a subreport that shows all
the parts of the ticket. Now this would be easy if the other tables had the
ticketId, I'd just "join" on that. But the other table doesn't have the
ticketId, only the partId (it's a table tracking auditing information, every
change to every part).
Can anyone suggest a way to do this? I can do it in raw SQL easily enough,
but I simply don't know how to make a report that uses it.
Maury