Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hallo Armin,

Nun gibt es in der Tabelle Artikel Datensätze, bei denen in der Spalte
artgr_id kein Wert steht

Bei meiner Abfrage
SELECT a.artnr, ag.artgr, a.beschr, a.prei2 FROM Artiklegruppe AS ag,
Artikel AS a WHERE a.artgr_id=ag.id AND a.lastupdate > '2013-01-01'

erhalte ich nur die Artikel, bei denen eine artgr_id eingetragen ist.
Wie bekomme ich die Artikel ohne Artikelgruppeneintrag?

Alle zusammen bekommst Du mit
SELECT a.artnr, ag.artgr, a.beschr, a.prei2 FROM Artikelgruppe AS ag
RIGHT JOIN Artikel AS a ON a.artgr_id=ag.id WHERE a.lastupdate >
'2013-01-01'

Und kann ich diese bei der Abfrage mit einen Wert 'ARTGR-Fehler' ausweisen?

SELECT a.artnr, IFNULL(ag.artgr,'ARTGR-Fehler'), a.beschr, a.prei2 FROM
Artikelgruppe AS ag RIGHT JOIN Artikel AS a ON a.artgr_id=ag.id WHERE
a.lastupdate > '2013-01-01'

Gruß

Robert

-- 
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.