Subject | Re: [firebird-support] Join to same table |
---|---|
Author | Milan Babuskov |
Post date | 2004-04-22T13:24:20Z |
adele_leroux wrote:
SELECT TableA.ID, TableA.Description, TableA.LinkID,
TableB.Description as LinkDescription
FROM TableA a
LEFT JOIN TableA b ON b.ID = a.LinkID
HTH
--
Milan Babuskov
http://fbexport.sourceforge.net
> Hi All, I am having problems executing a query that joins a table toTry:
> the same table. I execute this query in MS SQL server and it works
> fine. Firebird however returns blank (null) records
>
> SELECT TableA.ID, TableA.Description, TableA.LinkID,
> TableB.Description as LinkDescription
> FROM TableA
> LEFT JOIN TableA TableB ON TableB.ID = TableA.LinkID
SELECT TableA.ID, TableA.Description, TableA.LinkID,
TableB.Description as LinkDescription
FROM TableA a
LEFT JOIN TableA b ON b.ID = a.LinkID
HTH
--
Milan Babuskov
http://fbexport.sourceforge.net