Einzelnen Beitrag anzeigen

shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#5

Re: Ambiguous field names in firebird system tables

  Alt 11. Okt 2006, 19:03
Example:
SELECT * FROM Mastertable INNER JOIN DetailTable ON MasterTable.keyfield=DetailTable.keyfield You get all fields from both table as the result set.
Problem: there are 2 fields with the same name ("keyfield")
These fields are called ambiguous fields.
It depends on the DBMS how this conflict is solved. Some databases add the tablename as prefix:
Code:
Mastertable.keyfield, ...., DetailTable.keyfield
Other databases simply throw a error message.
You should show your complete SQL-Statement
Andreas
  Mit Zitat antworten Zitat