Hi,

is it possible to define sql to join a table with a query?

e.g. what I would like to be able to do is:

select * from dealers d left join <transquery> q on d.dealerid=q.dealerid

where <transquery> is a query as follows:

select t.dealerid, t.branchcode,max(t."date") from "trans.db" t
group by t.dealerid, t.branchcode

i.e. what I could do is create a new field on dealers and populate it with
the latest transaction date from the trans table, but I would rather do it
all from sql and not change the table structures.

btw, this is using bde and paradox tables.

thanks,

Steve.



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to