Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why data not displays

Status
Not open for further replies.

zaq888

MIS
Jun 2, 2003
46
MY
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;

Why data not displays
 
What are you trying to accomplish with this query? What are the question marks for? Do you want the query to prompt for the dates?
 
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...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top