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

  • Home
  • SEARCH
  • 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 8805827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:57:54+00:00 2026-06-14T01:57:54+00:00

I have 2 tables in ms access 2010 as below USERS (u_id, u_name) LOAN

  • 0

I have 2 tables in ms access 2010 as below

USERS (u_id, u_name)
LOAN (l_id, l_from[ref users.u_id], l_to[ref users.u_id], l_amount)

Users
+------+--------+
| u_id | u_name |
+------+--------+ 
| 1    | abc    |
| 2    | def    |
+------+--------+

Loan
+-----+--------+------+----------+
|l_id | l_from | l_to | l_amount |
+-----+--------+------+----------+
| 1   | 2      | 1    | 100      |
| 2   | 2      | 1    | 100      |
| 3   | 1      | 1    | 50       |
+-----+--------+------+----------+

I want to select names instead of numbers(l_from & l_to) from loan table

select
  loan.l_id,
  loan.l_from,
  users.u_name user_from,
  loan.l_to,
  users.u_name as user_to,
  loan.l_amount
from loan, users
where ???
  • 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-06-14T01:57:55+00:00Added an answer on June 14, 2026 at 1:57 am

    JOIN the users table two times like so:

    SELECT
      l.l_id,
      fromusers.u_name AS user_from,
      tousers.u_name AS user_to,
      l.l_amount
    FROM loan l
    INNER JOIN users fromusers ON l.l_from = fromusers.u_id
    INNER JOIN users tousers ON l.l_to = tousers.u_id
    

    SQL Fiddle Demo (it is SQL Server 2008, but should be the same syntax for ms-access, I think)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say we have two tables in an MS Access db: Service Users: | ID
Using Access 2010. Suppose I have three tables: dogs , cats , and catChases
I'm using Access 2010. I have a database with multiple tables, each containing different
I have a 2010 Access Database that I split for so multiple users can
I have two tables in a 2010 Access Database. One for Customers and One
I have two tables in an MS Access 2010 database: TBLIndividuals and TblIndividualsUpdates. They
I have a database(Access 2010) with about 6 tables related to 1 master table,
Have 2 tables in Access 2007, both lists of certain tasks to be accomplished.
I have an access database with these tables: - sequences: it describes the sequences
I have an Access database (in Access 2003) with several tables, and data must

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.