Volltext-Suche: Tabelle für Texte aus Dateien im DMS. DB und Rose
[kivitendo-erp.git] / sql / Pg-upgrade2 / warehouse2.sql
1 -- @tag: warehouse2
2 -- @description: Defaultwert für onhand
3 -- @depends: warehouse
4 UPDATE parts SET onhand = COALESCE((SELECT SUM(qty) FROM inventory WHERE inventory.parts_id = parts.id), 0);
5 ALTER TABLE parts ALTER COLUMN onhand SET DEFAULT 0;