INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

SQL query for time from integer

SQL query for time from integer

(OP)
I have a table that has users, logon time, logoff time.

IE
232Y    181442    194700
232Y    181442    195513
232Y    202313    203313
232Y    202313    204313
232Y    202313    205313
232Y    202313    210313
232Y    202313    210845

the user above logged in twice that day.
the system logs them out every 10 min and then starts another 10 min time frame.

Anyway I need to write a SQL statement that will tell me how long this user was logged into the system from the firt login to the last logout for that login time.
and then again for the second login time to the last logout time for that loging time as well.

I am stumped.   any ideas?   the login time and the logout time are both integers.    
Please help me out.

Thanks,
Bob

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close