SELECT id, date_start, date_end as "ID"
FROM project_task a
inner join project_task_type b
where a.date_start is not NULL and a.date_end is NULL
Give error in where
SELECT id, date_start, date_end as "ID"
FROM project_task a
inner join project_task_type b
where a.date_start is not NULL and a.date_end is NULL
Give error in where
As indicated by @Fly, you have to add the condition to the INNER JOIN
SELECT id, date_start, date_end as "ID"
FROM project_task a
inner join project_task_type b ON b.id=a.id_task_type
where a.date_start is not NULL and a.date_end is NULL
The part of ON b.id = a.id_task_type is the key missing from your query
The error is that you do not have a ON
clause in JOIN
It should be something like:
SELECT id, date_start, date_end as "ID"
FROM project_task a
inner join project_task_type b ON b.id=a.id_task_type
where a.date_start is not NULL and a.date_end is NULL
You can check the syntax of JOIN
in the official documentation: link