Announcement

Collapse
No announcement yet.

Problem SQL Query

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    ja ok, stimmt. Aber deine Query hat leider garnichts zurückgegeben und ich habe es daraufhin einfach so probiert und da wie du schon sagtest keine trippel, ... vorkommen, geht es eben.

    lg mo

    Comment


    • #17
      Hi,

      ich sehe jetzt auch, dass meine Query falsch ist. Das distinct muss weg.

      Gruß und gute Nacht
      docendo discimus

      Comment


      • #18
        Hi,

        nur noch der Vollständigkeit halber:

        select p1.Name, p1.Vorname,p1. Land,p1. Plz from person p1
        where exists
        (select p2.land,p2.plz from person p2
        where p2.plz=p1.plz and p2.land=p1.land
        and p1.ssn<>p2.ssn group by p2.land, p2.plz having count(*)=1)
        order by p1.land,p1.plz

        Gruß
        docendo discimus

        Comment

        Working...
        X