Darstellung
Material Attributes
SQL-Vorlage aus der reybex-Standardbibliothek – für BAS23-Exportjobs und Ad-hoc-Tests.
Abfrage
sql
SELECT material.sku AS sku,
material.mat_code AS matCode,
material.name AS materialName,
attribute.name AS attributeName,
attribute.attribute_code AS attributeCode
FROM material_attribute materialAttribute
JOIN material AS material ON material.id = materialAttribute.material_id
JOIN attribute AS attribute ON attribute.id = materialAttribute.attribute_id
WHERE materialAttribute.tenant_id = :tenantId
ORDER BY material.id;