DeathMasterIII: Suche eines Artikels in 5 Tabellen

Beitrag lesen

Hi!

Probier mal mit Joins herum:
LEFT|RIGHT|FULL OUTER JOIN //Eine bestimmte Seite darf nicht NULL sein
bzw. INNER JOIN //Keine Seite darf NULL sein.

NULL sein heißt in diesem Fall wenn kein Gegenstück auf der anderen Seite vorhanden ist!

Syntax:
SELECT *
FROM Tabelle t1 INNER JOIN Tabelle t2 ON t1.key = t2.key
WHERE t1.key = wert

In deinem Fall:

SELECT COUNT(t1.ISBN), COUNT(t2.ISBN), COUNT(t3.ISBN)...
FROM ((tabelle1 t1 FULL OUTER JOIN tabelle2 t2 ON t1.ISBN = t2.ISBN) FULL OUTER JOIN tabelle3 t3 ON t1.ISBN = t3.ISBN) ...
WHERE t1.ISBN='123-12345-123-X'

Ich kann nicht sagen ob das so funzt wie du willst.
Ach ja: Schön wäre es wenn du SQL-Schlüsselwörter großschreiben würdest --> Is so eine Vereinbarung der Schreibweise (zwar nicht zwingend is aber trotzdem schöner)
--------------
mfg DMIII

--
Real programmers don't comment their code!
If it was hard to write it should be hard to read and understand and even harder to modify!
Selfcode: ss:) zu:) ls:< fo:# de:> va:} ch:{ sh:) n4:{ rl:( br:^ js:( ie:% fl:) mo:)
http://emmanuel.dammerer.at/selfcode.html