Hi
I have two tables customer(name, address etc.) and Job(description, jobdate etc.)
I want all customer for and all jobs between given dates .if jobs not found for customer even it must show customer
Hi
I have two tables customer(name, address etc.) and Job(description, jobdate etc.)
I want all customer for and all jobs between given dates .if jobs not found for customer even it must show customer
Something like this:
SELECT c., j.
FROM customer c
LEFT OUTER JOIN job j ON j.jobdate >= @start_date AND j.jobdate < DATEADD(DAY, 1, @end_date) AND j.customer_id = c.customer_id