Subject | RE: [firebird-support] Is it possible to do this query? |
---|---|
Author | Helen Borrie |
Post date | 2006-03-12T05:39:24Z |
At 04:15 PM 12/03/2006, you wrote:
column in Payment references the primary key or unique constraint in Billing?
type-compatible) from different tables to output in different rows of
a single set.
But more to the point at the moment is what you've got to correlate
the many payments to the single billing. Since you don't have it in
the structure you provided, I assume you have an intersection table?
./heLen
>Yes, Billing is related to Payment in a one to many relationship. So I kindOK, so what does the referential relationship look like? i.e. which
>of want a "transaction log" where I have one billing line followed by all
>the payments on that line.
column in Payment references the primary key or unique constraint in Billing?
>It's medical so each item has payments applied specifically to it.A union is the only way you are going to get columns (which must be
>
>Typically the co-pay, then an insurance payment and then a write off. I am
>actually currently reading in your book about Unions as Adam suggested...am
>I barking up the right tree?
type-compatible) from different tables to output in different rows of
a single set.
But more to the point at the moment is what you've got to correlate
the many payments to the single billing. Since you don't have it in
the structure you provided, I assume you have an intersection table?
./heLen