SELECT TUnit.[cs-username]
FROM TUnit LEFT JOIN TData ON TUnit.[cs-username]=TData.[cs-username]
WHERE TData.[date] BETWEEN ? AND ? AND TData.[cs-username] Is Null;
this is what i mean:
TData contains date, time, cs-username, ipaddress etc
Tunit contains cs-username, area, etc
? means pick up input (date) from user, that means user will key in the date to generete report from
? to ?.
e.g:
Tdata contain 1. 3-may-03, abc,...etc
2. 3-may-03, def,....
3. 4-may-03, ghi,...
TUnit contain 1. abc,....
2. def,..
3. ghi,...
4. jkl,...
when i execute the sql with input 03-may-03 for the first '?' and 3-may-03 for the second '?'
Iwant it to show data from table Tdata that range from
3-may-03 till 3-may-03
the result is, it will display data 1. n 2. from TData.
then from this data, i want sql to compare the cs-username colum with table TUnit cs-username column also.
Then as the result, it can displays the user that not login: last result ghi
jkl is benn displayed...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.