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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:51:32+00:00 2026-05-27T13:51:32+00:00

I have a query, but I can’t figure out how to modify it to

  • 0

I have a query, but I can’t figure out how to modify it to serve my needs.

SELECT POST_DATE, R1SUM AS Batch, R2SUM AS DailySF, Format( (R2SUM/(R2SUM+R1SUM)), 'Percent') AS Throughput
FROM 
(SELECT (COL1+COL2+COL3+COL4) as R1SUM, DAY
FROM DVDR)  AS r1, 
(SELECT  sum(TOTAL) as R2SUM, POST_DATE
FROM SENTSF
WHERE TMC=444)  AS r2
WHERE DAY=POST_DATE

When table R1 has no matching days in R2 (or vice versa), this query does not show the entry; but I need to reflect it with 0 values for missing record).

Must work in MSAccess.

Table1:
DATE  | COL1 | COL2 | COL3 | COL4 | 
1-1-1 |  2   |  1   |   1  |   1  |
1-1-1 |  4   |  5   |   1  |   1  |
1-2-1 |  1   |  2   |   2  |   2  |

Table2 :
DATE  | TOTAL| 
1-1-1 |  2   | 
1-1-1 |  6   | 

I want it to show the final table:

DATE  | DailyBatch | DailySF | Throughput| 
1-1-1 |  16         |  8     |     50%   |
1-2-1 |  7          |  0     |      0%   |
  • 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-27T13:51:33+00:00Added an answer on May 27, 2026 at 1:51 pm

    With a UNION:

    SELECT POST_DATE, 
           sum(R1SUM) AS Daily_Batch, 
           sum(R2SUM) AS Daily_SFs, 
           Format( (sum(R2SUM)/sum(R2SUM+R1SUM)), 'Percent') AS Throughput
    FROM 
    (SELECT DAY as POST_DATE, (
            COL1+COL2+COL3+COL4) as R1SUM, 
            0 as R2SUM 
     FROM D_VDR 
     union all
     SELECT POST_DATE, 
            0 as R1SUM, 
            sum(TOTAL) as R2SUM 
     FROM SENT_SF 
     WHERE TMC=444
    ) AS sq
    group by POST_DATE
    

    (Essentially, this is simulating a full outer join, which I understand is not available in Access.)

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

Sidebar

Related Questions

I have this query but apparently it can loop and crash the server. SELECT
I am trying to run this query but can't figure out why MySQL doesnt
I have an nHibernate query issue that looks quite straight forward, but I can't
I have a query that I know can be done using a subselect, but
I have following query which has select query that returns data in 5sec. But
I have a query from sql but I can't seem to make it work
I have an SQL Query that i'm running but I only want to select
I have a simple query in PHP but I can't get Like to work.
I have this SQL query but its running soo slow, SELECT wr.wr_re_id as ReID,
I have tried all kinds of different ways to query this but just can't

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.