Hi,
Folgende
SQL-
Query liefert mir alle Datensätze 2 mal.
SQL-Code:
/* Die = 1 Bedingung würde innerhalb von Delphi durch = i ausgetauscht werden (for-schleife) */
SELECT xls_fld.ID,xls_fld.name,xls_fld.color FROM xls_tpl LEFT JOIN xls_fld ON xls_fld.tplid = 1
Seltsamerweise existiert aber jeder Datensatz nur einmal in der Datenbank. Das heißt ich scheine ungewollt jeden Datensatz zweimal zu selectieren.
Das Problem behoben habe ich so:
SELECT distinct xls_fld.ID,xls_fld.name,xls_fld.color FROM xls_tpl LEFT JOIN xls_fld ON xls_fld.tplid = 1
Allerdings würde mich jetzt interessieren was an obiger
Query falsch ist.
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."