Zitat von
Blup:
z.B. so:
SQL-Code:
SELECT c.*,
(SELECT count(p.Customer_Number)
FROM Position p
Where p.Customer_Number = c.Customer_Number) Anzahl
FROM Customer c
Eigentlich am schnellsten müsste sein
SQL-Code:
SELECT c.*,
(SELECT count(p.Customer_Number)
FROM Position p
Where p.Customer_Number = c.Customer_Number and p.announcement_date > Date()) Anzahl
FROM Customer c