> Select
>
b.IdentNrA,b.Menge,b.Preis,b.ArtPosition,c.Artikel_Status,d.beschTitel,e.Str
> asse,e.PLZ,e.Stadt,e.Land
> From
> Bestellungen_Status_Text f right join (BestellungenAdr e inner join
> Bestellungen a using(IdentNrS)) using (BestellStatus) inner join
> BestellungenP b using (IdentNrS) inner join artikel c using (IdentNrA)
inner
> join ArtikelText d using (IdentNrA)
> Where
> b.IdentNrS = 22 and
> d.Sprache = 'DE'
> Order By b.ArtPosition
>
> does not work.

"doesn not work" isn't very descriptive. Do you get an error message?
If so, which?

I assume the problem is that you are trying to bracket the table
references, which for I cannot see any syntax reference on
http://www.mysql.com/doc/J/O/JOIN.html.

You can easily rewrite the query to avoid the brackets by using a left
join instead of a right join:

SELECT     b.IdentNrA, b.Menge, b.Preis, b.ArtPosition,
           c.Artikel_Status,
           d.beschTitel,
           e.Strasse, e.PLZ, e.Stadt, e.Land
FROM       BestellungenAdr e
           INNER JOIN Bestellungen a USING(IdentNrS)
           LEFT JOIN Bestellungen_Status_Text f USING (BestellStatus)
           INNER JOIN BestellungenP b USING (IdentNrS)
           INNER JOIN artikel c USING (IdentNrA)
           INNER JOIN ArtikelText d USING (IdentNrA)
WHERE      b.IdentNrS = 22 AND
           d.Sprache = 'DE'
ORDER BY   b.ArtPosition


Bye,

        Benjamin.

Hello,

first thanks for your answer.
Your example does not work because the IdentNrS field is not in the table
Bestellungen_Status.
I have to link BestellungenAdr,Bestellungen_Status_Text,BestellungenP to the
table Bestellungen.
There is no example in the MySQL docu for this. Only for two tables.
The way i tried it was from MS Access. The only other database i am using is
Oracle. And Oracle has a completely different join syntax.

Thanks

Armin


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to