Forum: Datenbanken
Delphi
by alzaimar,
22. Jan 2008
So gut wie identisch mit der langsamen Lösung von hoika.
hoika: Ich habe mir angewöhnt, Standardqueries (die also zum Grundrepertoire der Anwendung gehören) in Views oder UDF zu packen. Man hat eine Abstraktionsschicht, die zudem noch eine Performancesteigerung bringt.
Du hast hier z.B. eine Sicht auf Positionen und Projekte, die nicht in der Except-Liste stehen. Das würde ich in eine View...
Forum: Datenbanken
Delphi
by alzaimar,
21. Jan 2008
Select Booking.booking_id,
Booking.project_id
From (
Booking
Join Project On Project.project_id=Booking.project_id
Join Pos On Pos.project_id=Project.project_id
)
Left join except_projects on except_projects.project_id = Booking.projectID
where except_projects.project_id is null