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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:31:00+00:00 2026-06-12T16:31:00+00:00

I am using access,and I have two tables: point: id,x,y 1 32432432 143423232 2

  • 0

I am using access,and I have two tables:

point:

id,x,y
1 32432432 143423232
2 32432443 143423300

line:

id startPoint endPoint
1  1          2

Now, when I query the line,I want the returned table will contain both the x,y of the startPoint and the endPoint.

I have tried the join:

select line.*,point.x as x1,point.y as y1 from line as line join point as point on line.startPoint=point.id where line.id=1;

Then I can get the following result which only contain the startPoint.

id startPoint endPoint x1 y1
1  1          2        ......

Then how to retrive the endPoint while I want the result like this(x2 y2 is the coordinate of the endPoint):

id startPoint endPoint x1 y1 x2 y2
1  1          2        ......

I tried two join,but it does not work.

select line.*,point1.x as x1,point1.y as y1,point2.x as x2,point.y as y2 from line as line left join point1 as point on line.startPoint=point1.id  left join point as point2 on line.endPoint=point2.id where line.id=1;
  • 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-12T16:31:02+00:00Added an answer on June 12, 2026 at 4:31 pm

    Access has weird syntax rules for multiple joins. You have to put them in parentheses like so.

    select line.*, point1.x as x1,point1.y as y1,
        point2.x as x2, point.y as y2
    from (line as line
    left join point as point1
    on line.startPoint = point1.id)
    left join point as point2
    on line.endPoint = point2.id
    where line.id = 1;
    

    Each additional join requires another left paren before the first table and a right paren after the second-to-last join.

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

Sidebar

Related Questions

I have developed an database application with Delphi XE2 using an Access DB, now
I have a query being created using OLEDB from access and need to get
I'm using Access 2010. I have a database with multiple tables, each containing different
I'm currently facing a database query issue. I have two tables, items and details
I have two tables named utilities and types that i am trying to access
I have 3 tables on which i need to select data from using ms-access
I have access of a database which has two tables. These two tables have
I have two tables in an MS Access 2010 database: TBLIndividuals and TblIndividualsUpdates. They
I have two tables: Products -ProductID, -ProductName, -ProductCategoryID, ProductCategories -ProductCategoryID, -ProductCategoryName, I am using
We have an ADP project created several years ago using Access 2000. This project

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.