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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:50:30+00:00 2026-05-26T21:50:30+00:00

I have a single table with this schema: |code|time|fk| ————– |a |0.1 |2 |

  • 0

I have a single table with this schema:

 |code|time|fk|
 --------------
 |a   |0.1 |2 |
 |b   |0.2 |1 |
 |b   |0.3 |2 |

And I would want to make compare all the codes and give me something like this:

 |code|time_fk1|time_fk2|
 ------------------------
 |a   |null    |0.1     |
 |b   |0.2     |0.3     |

sql: select code, time_fk1, time_fk2 from table2 as fk1 left join table2 as fk2 on fk1.code=fk2.code where (fk1.fk=1 or fk1.fk is null) and (fk2.fk=2 or fk2.fk is null)

The goal is a full outer join: but im not complicating to much yet because not even a left/right join works

But access gives me only this with that query:

 |code|time_fk1|time_fk2|
 ------------------------
 |b   |0.2     |0.3     |

It acts exactly as it were a inner join! If I change the “left” in the above query for (right or inner the results are the same)

thanks

  • 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-26T21:50:30+00:00Added an answer on May 26, 2026 at 9:50 pm
    select code, SUM(time_fk1), SUM(time_fk2)
    from
    
    (   
    (select code, time as time_fk1, 0
    from table 
    where fk=1)
    
    UNION
    
    (select code, 0,time as time_fk2
    from table 
    where fk=2)
    ) a
    
    group by code
    

    However, using this query b will come twice in the result if it has time against both fk’s.

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

Sidebar

Related Questions

I have dbml with single table users i want add partial class for User
I have a form that searches all rows in a single table (TServices) that
I'm working on a project that will have a single table holding lots and
I have a huge access mdb file which contains a single table with 20-30
Let's say you have a database with a single table like... --------------------------------------------- | Name
I have a single entry output from a paradox table which is imported into
I have a database containing a single huge table. At the moment a query
I have a table where on a single record update, a trigger adds a
I have a fairly huge database with a master table with a single column
Background I have a dimension table that has a single record for each day.

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.