AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Mehere Tabellen und Join - Schreibschutz?
Thema durchsuchen
Ansicht
Themen-Optionen

Mehere Tabellen und Join - Schreibschutz?

Ein Thema von Stern · begonnen am 23. Nov 2007 · letzter Beitrag vom 23. Nov 2007
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.542 Beiträge
 
Delphi 11 Alexandria
 
#11

Re: Mehere Tabellen und Join - Schreibschutz?

  Alt 23. Nov 2007, 14:50
Ersetz mal das 2. SELECT durch FROM
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
Benutzerbild von Stern
Stern

Registriert seit: 26. Feb 2007
Ort: Köln
74 Beiträge
 
#12

Re: Mehere Tabellen und Join - Schreibschutz?

  Alt 23. Nov 2007, 14:54
oh, im Programm hab ich das mit FROM. Hier wohl schlecht kopiert...
Geht aber auch nich mit FROM....

Naja, trotzdem vielen Lieben Dank für eure Hilfen.--> Steffi ab zu SQL-TUTS...

Liebe Grüße
Steffi
steffi
  Mit Zitat antworten Zitat
Relicted

Registriert seit: 24. Jan 2006
Ort: Iserlohn
646 Beiträge
 
Delphi 10.4 Sydney
 
#13

Re: Mehere Tabellen und Join - Schreibschutz?

  Alt 23. Nov 2007, 14:56
SQL-Code:
select K.KNR,
  K.KVORNAME,
  K.KNACHNAME,
  K.KADRESSE,
  K.KPLZ,
  K.KWOHNORT,
  R.RNUM,
  R.RBETRAG,
  R.RSTATUS,
  R.RDAT,

  from Kunden K
  inner join Rechnungen R on R.RKUNDE = K.Knr
nur nochmal zur auffrischung den allgemeinen sql aufbau (vereinfacht):

SQL-Code:
SELECT (spalte)
FROM (tabelle)
[ JOIN (tabelle) ON (bedingung) ....]
WHERE (bedingung)
[GROUP BY (spalte)]
oder nochmal die basics zum wiedereinsteigen hier

gruß
reli
  Mit Zitat antworten Zitat
Benutzerbild von RavenIV
RavenIV

Registriert seit: 12. Jan 2005
Ort: Waldshut-Tiengen
2.875 Beiträge
 
Delphi 2007 Enterprise
 
#14

Re: Mehere Tabellen und Join - Schreibschutz?

  Alt 23. Nov 2007, 15:03
Solltest Dir vielleicht dann den Cross Join anschauen.
Zitat:
Cross join (Cartesian product)
Cross join, or the Cartesian product of two tables, can be defined as another (rather virtual) table that consists of all possible pairs of rows from the two source tables. Returning to our customer phone example in the nonequijoin section of this chapter, the cross join of the CUSTOMER and PHONE tables returns results very similar to what we've got on Figure 8-2 except it would also return the valid customer/phone combinations, excluded from the previously mentioned nonequijoin.

SQL99 standard syntax
This query will return all possible combinations of customer names and phone numbers by performing cross join of CUSTOMER and PHONE tables:

SELECT cust_name_s,
phone_phonenum_s
FROM customer CROSS JOIN
phone
Klaus E.
Linux - das längste Text-Adventure aller Zeiten...
Wer nie Linux mit dem vi konfiguriert hat, der hat am Leben vorbei geklickt.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:35 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz