Subject Re: [firebird-support] Interbase to Firebird conversion - Joined tables
Author Jason Dodson
Try using an explicit join instead of the depricated way you are. More often
than not, it will yeild better results:

Select *
From FirstTable A Inner Join SecondTable B on A.linkfield = B.linkfield

But to elaborate on your error, obviously, table A and B share a field by the
name 'linkfield'. The fact that you are selecting from both tables with *, the
names are colliding.

Jason

benniecoetzer wrote:
> I have the following code in a Delphi program. Using GDS32.dll on the
> database works fine, however if I use fbclient I get the error message
> as shown. I was using Interbase 6.5 and am trying to convert to
> Firebird 1.5
>
> SQL statement
>
> 'SELECT * ' +
> ' FROM FIRSTTABLE A, SECONDTABLE B' +
> ' WHERE B.linkfield = A.linkfield';
>
> // ' FROM FIRSTTABLE, SECONDTABLE' +
> // ' WHERE FIRSTTABLE.linkfield = SECONDTABLE.linkfield';
> (This was another attempt but getting the same answer
>
> Error Message
>
> Database Server Error: Ambiguous field name between table FIRSTTABLE
> and table SECONDTABLE LINKFIELD
>
> Any suggestions?
>
>
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>