Hi All,
I have to do a rather simple query, but a previous design error that did not make one of the fields required (it allows nulls when it shouldn't have) makes it a bit harder.
I have a table projects and a table clients
Projects_Tbl
ProjId
ProjName
ClientId
Clients_Tbl
ClientId
ClientName
I need to select all projects with client name. The SQL statement should work fine as:
Select * from Projects_Tbl, Clients_Tbl
where Projects_Tbl.ClientId = Clients_Tbl.ClientId
The problem is that it left out all projects with NULL clientId (in Projects_Tbl)
Can anyone help?
I tried using an "OR" such:
where Projects_Tbl.ClientId = Clients_Tbl.ClientId or Projects_Tbl.ClientId is NULL
but it does not return the right results.
Thanks.