I am trying to write a basic SQL query, but can't quite get it to work.
I am trying to join 3 tables when 1 of the tables may not have a value.
select
distinct(jobnumber),
name,
reference,
DescriptionOption
from
Heading
join tracking
on heading.jobkeyid = tracking.jobkeyid
join Information
on Heading.jobkeyid = information.jobkeyid
Where
StageID < 199
and heading.DateInProduction > '2022-07-01 00:00:00.000'
and DescriptionOption IN ('Style FF', 'FF')
order by
JobNumber desc
This is what I have done but if the tracking table doesn't have the requested data it doesn't show in the results.