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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:12:45+00:00 2026-06-02T02:12:45+00:00

I want to execute a simple join on two tables after connecting two columns

  • 0

I want to execute a simple join on two tables after connecting two columns with ids on one of these tables.

First step:

SELECT cars.hhid & cars.vmid
FROM cars

Now I want to compare this result with another table (table2).

The new result should be every row in table1 (cars) that match with id in table2.

What’s wrong?

My code:

SELECT Cars.* 
FROM (SELECT Cars.hhid & Cars.vmid AS zid
FROM cars) x
JOIN table2 ON table2.id = x.zid;
  • 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-02T02:12:47+00:00Added an answer on June 2, 2026 at 2:12 am

    From what you’ve said in the question, I don’t see why you need a subquery at all.

    Try this:

    select cars.*
    from cars 
    inner join table2 on cstr(table2.id) = cars.hhid & cars.vmid
    

    (tested with double as data type for all three fields)

    You don’t need the subquery because you can put your “connected columns” directly into the JOIN clause (of course you can put them into the SELECT clause as well if you need them there).

    However, as soon as you concatenate the columns, Access seems to treat them as a string, so you can’t join them directly on the double column in table2.
    That’s why you need to convert the column from table2 to a string with CStr().

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

Sidebar

Related Questions

I want to execute simple statement: SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Text;Database=C:\Temp\;','SELECT * FROM [test.csv]') And
I want to execute a mapreduce query, in erlang, that contains two map phases
i only want to execute a simple Update to an Access Database. Update table
I want to execute an SQL query like: select 'tb1'.'f1','tb1'.'f2','tb2'.'f1' from 'tb1','tb2'; Now the
The problem is next - I want to execute simple query (e.g. 10 rows
I want to execute a simple function in Oracle. The signature is defined as
I'm using Perl 5.10.6 on Mac 10.6.6. I want to execute a simple search
I want to execute initialize() function on page load, but by simple <body onLoad=initialize()>
I simply want to execute the following Mysql statement SET @a = 1;SELECT @a;
I am simply opening my FindDialog with: FindDialog.Execute; In my FindDialog.OnFind event, I want

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.