Subject Re: 2 details in the sabe grid
Author roufusoffv
--- In, Andrei Luís
<> wrote:

> It is a master -> 2 details problem. The problem is that I need to
> show the details results in 1 ib_grid only. The detail tables
> structures are the same, by the way, it's only 1 detail table with
> different where clause.
> Tables Structures:
> Master (customers and bondsman);
> rec_id (pk)
> name
> ...
> Detail 1(sales by customer)
> rec_id (pk)
> customer_id
> bondsman_id
> ...
> Detail 2(sales with a bondsman)
> rec_id(pk)
> customer_id
> bondsman_id
> The customers, could be a bondsman too. So, I need to show in only
> grid: sales by customer selected in master table + sales that the
> customer is a bondsman.
> Today I have two queries, and two grids to show the info. 1 query
> masterlinks to customer_id and the other it points to bondsman_id.
> The question is, how can I do that?
> Hope I was clear, my english is not very good.

It is indeed true that you can only display one query in a grid at a
time, however there still might be a solution to your problem.

Is it possible to write your two detail queries as one combined
query, possibly using the UNION or UNION ALL element? There are
disadvantages to doing this, such as the increased difficulty of
making the query updatable, but it is a way to accomplish what
you're looking to do.

Shawn Zilbert