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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Problem.. i'm Newbie......

Status
Not open for further replies.

zaq888

MIS
Jun 2, 2003
46
0
0
MY
Hi guys..
i have code one query to know wether the user logged in or not during certain date.

SELECT TUnit.[cs-username]
FROM TUnit LEFT JOIN [SELECT * FROM Tdata WHERE Tdata.date BETWEEN ? AND ?]. AS MyTempTbl ON TUnit.[cs-username] = MyTempTbl.[cs-username]
WHERE (((MyTempTbl.[cs-username]) Is Null))
ORDER BY Tunit.[cs-username];

my question is, how can i know wether the user is not logged in during the 3 consecutive days?

means
Unit Not Login
19/6/2003 ABC
DEF

20/6/2003 ABC

21/6/2003 ABC
DEF
in the example above, ABC have not logged in during the 3 consecutive days. How can i make it using SQL above? to add filter user not logged in during 3 consecutive days.

I'm Keep Studying.... please show the way...
Not Good in English
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top