Subject Re: [firebird-support] Select error
Author Svein Erling Tysvaer
At 12:09 20.06.2003 +0000, you wrote:
>I'm using FB 1.5 RC3 but I have tested under 1.0.2 too and got the
>same erro message.

That eliminates the possibility of ambiguous field names having
unpredictable results.

> > 2) What is the definition of aluno and matricula (field names and
>types)?
>
>id_aluno -> Integer (Pk of aluno)
>nome_aluno -> Varchar(80) (with an secondary index)
>cod_matr -> Integer (Pk of matricula)
>linhacron_matr -> Smallint
>periodoano_matr -> Char(6)
>idaluno_matr -> Integer
>periodoano_paramper -> Char(6)

Hmm, are periodoano_matr (or periodoano_paramper) and sequencia_paramper
both part of the aluno table?

Or rather, what would

select id_aluno, nome_aluno, cod_matr, linhacron_matr, periodoano_matr
from aluno
left join matricula
on idaluno_matr = id_aluno
join param_per
on (periodoano_paramper = periodoano_matr)
where (periodoano_matr <> '3/2003') and
(sequencia_paramper = 3)

look like if you qualified all fields with its table name (not knowing
which field belongs to which table makes it more difficult to understand)?

Set