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 6235769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:43:40+00:00 2026-05-24T10:43:40+00:00

There are two databases and 4 tables involved in this query. The first database(PhoneBills)

  • 0

There are two databases and 4 tables involved in this query. The first database(PhoneBills) contains the first table(CallDetails), and within this there are columns for :

  1. [Time] (start time)
  2. [From] (caller number)
  3. [To] (target number)
  4. [Cost] (in money)
  5. [Length] (how long called)

The columns of interest here are [From] and [To].

In the second database(rtc – this is a Lync persistent data DB) there are three tables of interest :

  1. Resource (matches ResourceID to Username)
  2. ResourceDirectory (defines the Time a ResourceID was Inserted and when it was last Updated)
  3. ResourcePhone (matches a ResouceID to a phonenumber)

I don’t honestly know what ResourceDirectory defines, I am guessing that the phone numbers that usernames are matched to can change, and the directory keeps track of those times. For the purposes of simplification, I will ignore this part for now.

What I am trying to achieve is to get the Username from Resource given that I can find a match for my phone number in ResourcePhone.

  • 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-24T10:43:41+00:00Added an answer on May 24, 2026 at 10:43 am

    Won’t this work?

    SELECT Username
    FROM Resource R
    JOIN ResourcePhone RP on R.ResourceID = RP.ResourceID
    WHERE RP.phonenumber = '1111111111'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One doubt in MSSQL. There are two tables in a databases. Table 1 named
I need to merge two SELECT statements. There are two tables in my database,
We have two tables in a SQL Server 2005 database, A and B.There is
I will explain problem with an example: There is two table in my database,
I have a database that has two tables, one of which contains a foreign
This is the situation: I have server with linux, and there is two databases
Say I have a database called Poll and have these two table structures. poll
There are two databases in SQL Server 2005: One called A and another one
There are two variables in our database called OB and B2B_OB . There are
There are two popular closure styles in javascript. The first I call anonymous constructor

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.