Fórum Ambiguous field name between table RDB$RELATION_CONSTRAINTS #334314
06/12/2006
0
---------------------------
Borland Data Provider
---------------------------
Ambiguous field name between table RDB$RELATION_CONSTRAINTS and table RDB$RELATIONS
RDB$RELATION_NAME
---------------------------
OK
---------------------------
Alguém sabe o que pode ser?
Quando eu gero a query manualmente e depois seleciono um DataSet aparece a seguinte mensagem de erro também:
---------------------------
Borland Data Provider
---------------------------
TableMapping update failed: Ambiguous field name between table RDB$RELATION_CONSTRAINTS and table RDB$RELATIONS
RDB$RELATION_NAME
---------------------------
OK
---------------------------
Não tenho muita experiência em desenvolvimento ASP.NET com delphi, alguém tem uma dica de onde eu posso começar?
Abraço!
Desde já agradecido
Adam
Curtir tópico
+ 0Posts
06/12/2006
Emerson Nascimento
imagine o seguinte:
tabela1
---------
nome
endereco
telefone
tabela2
---------
nome
profissao
nascimento
instrução:
select * from tabela1 tab1 left join tabela2 tab2 on (tab2.nome=tab1.nome)
where nome = ´ZÉ´
note que há o campo [i:7cc6fac38f]nome[/i:7cc6fac38f] nas duas tabelas. nesse caso o mecanismo não sabe qual utilizar no where, gerando a mensagem de ambiguidade de campos. para solucionar isso, basta fazer:
select * from tabela1 tab1 left join tabela2 tab2 on (tab2.nome=tab1.nome)
where [b:7cc6fac38f]tab1.[/b:7cc6fac38f]nome = ´ZÉ´
Gostei + 0
06/12/2006
Emerson Nascimento
select nome, endereco, profissao
from tabela1 tab1
left join tabela2 tab2 on (tab2.nome=tab1.nome)
where nome = ´ZÉ´
o mecanismo teria problema tanto no select quanto no where, por conta do campo [i:8ae8ecf649]nome[/i:8ae8ecf649]. o campo [i:8ae8ecf649]endereco [/i:8ae8ecf649]existe somente na tab1, o campo [i:8ae8ecf649]profissao [/i:8ae8ecf649]existe somente na tab2, mas o campo [i:8ae8ecf649]nome [/i:8ae8ecf649]existe em ambas e ele não sabe qual selecionar.
Gostei + 0
07/12/2006
Adam
Gostei + 0
07/12/2006
Emerson Nascimento
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)