[thelist] sql question

Matt Warden mwarden at gmail.com
Tue Apr 11 14:19:50 CDT 2006

On 4/11/06, Dallas Cahker <christmasfruitcake at gmail.com> wrote:
> SELECT O.orderid, D.email, D.dealerid, DT.dealerid AS dealeridDT, DT.tmid
> FROM dealer_tm DT
> INNER JOIN dealer D
>  ON D.dealerid = DT.dealerid
> INNER JOIN order O
>  ON D.dealerid = O.dealerid
> WHERE DT.dealerid = '0325687A'
> ORDER BY D.dealerid;

Here's my shot, without seeing your full table structure. If it works
I can put it into inner join form for you.

select O.orderid, subD.email, subD.dealerid
from dealer_tm DT, order O, dealer subD
where O.dealerid=subD.dealerid
    and subD.dealerid=DT.subdealerid
    and DT.dealerid='0325687A'
order by subD.dealerid

If that doesn't help, let us see your table structure (instead of
describing it narratively) and we'll get you a solution.


Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list