O
Oscar
This is my case :
First, the query should find which employees have a contract and add a
record for each employee ID
After that it should add a column which holds the value of the last date at
which the employee has worked or is empty in case the employee has not
worked yet.
concerned tables and fields are :
tblEmp.IDemp
tblContracts.IDemp
tblWorked.IDemp
tblWorked.Date
My query is :
SELECT tblEMP.IDemp AS WID,dateL FROM tblEmp AS w INNER JOIN (SELECT
MAX(tblWorked.date) AS dateL FROM tblWorked AS G WHERE G.IDemp=w.IDemp) ON
w.IDemp = tblContracts.IDemp "
In my VB app the compiler fires a 'Syntax Error in FROM clause'. How should
I rewrite the SELECT part of this query ?
First, the query should find which employees have a contract and add a
record for each employee ID
After that it should add a column which holds the value of the last date at
which the employee has worked or is empty in case the employee has not
worked yet.
concerned tables and fields are :
tblEmp.IDemp
tblContracts.IDemp
tblWorked.IDemp
tblWorked.Date
My query is :
SELECT tblEMP.IDemp AS WID,dateL FROM tblEmp AS w INNER JOIN (SELECT
MAX(tblWorked.date) AS dateL FROM tblWorked AS G WHERE G.IDemp=w.IDemp) ON
w.IDemp = tblContracts.IDemp "
In my VB app the compiler fires a 'Syntax Error in FROM clause'. How should
I rewrite the SELECT part of this query ?