Subject Re: [ib-support] Firebird 1.5 join error
Author Helen Borrie
At 03:09 PM 8/05/2003 -0400, you wrote:
>In Firebird 1.5 the following SQL statement "select CL_PERSON_NBR from
>CL_PERSON P join EE E on P.CL_PERSON_NBR=E.CL_PERSON_NBR" causes an error
>"Dynamic SQL Error SQL error code = -204 internal gds software consistency
>check (table CL_PERSON) CL_PERSON_NBR". If a table reference is added to
>the selected column (i.e. select P.CL_PERSON_NBR) the statement works
>fine. The same statement works in Interbase 6.01 without errors. Please,
>let me know if I need to submit this problem as a bug report.

The bug is in IB 6.01. This is an ambiguous query which may or may not
return the correct results. In Firebird, you need to qualify *every*
column reference in a multi-table query, e.g.

select P.CL_PERSON_NBR from CL_PERSON P
join EE E
on P.CL_PERSON_NBR=E.CL_PERSON_NBR

heLen