Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:43:29+00:00 2026-05-29T09:43:29+00:00

Simply looking for a better direction, not a solution. I have two tables –

  • 0

Simply looking for a better direction, not a solution.

I have two tables – A, B

Table A has ip address and time (time will be either equal to or between starttime and endtime)

Table B has username, starttime, endtime, ip address

The job, I am trying to find out what ip address and time in in table A correspond the username in table B.

More generally, who (username) was using a specific ip address at a specific time.

Assuming my explanation makes sense, does this seem like something using joins can accomplish between the two tables? If not what is the next best step. I am trying to avoid a lot of manual queries from one table to another.

Any direction is welcome, thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:43:30+00:00Added an answer on May 29, 2026 at 9:43 am

    Yes, a join is appropriate. The condition needs to be a compound condition that matches both the ip address and the time constraints.

    select B.username, A.ipaddress, A.time
     from A inner join B on A.ipaddress = B.ipaddress 
                            and A.time between B.starttime and B.endtime
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of dicts that stores URLs. It has simply two fields,
Simply, I'm just looking to get a list of connected remote disks. I have
I'm looking for educational material on the subject of scalability analysis. I'm not simply
I'm looking for a better way to this. I have a chunk of code
For this question, I'm looking to see if anyone has a better idea of
I'm looking for the simplest solution to this situation: I have a pre existing
I am simply looking for a way of using drag and drop without jquery
I'm looking for a tool that simply tests a web server which I developed
I'm looking for a plugin or way to simply go from any namespace, type,
I am looking for a XSL snippet that simply returns the XML unaltered. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.