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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:09:18+00:00 2026-05-23T04:09:18+00:00

I have two db tables. One table contains Forecast data. The second table contains

  • 0

I have two db tables. One table contains Forecast data. The second table contains Actual data. I have two javabeans that represent each of these tables.

I want a jsp view (JSTL/EL) that lists the forcasted data, the actual data and then delta between the two in groups of weekly dates, such as this:

                              1/1/11                    1/8/11
 CONTRACT   LineCode     Forecast Actual Delta    Forecast Actual Delta 
   B&M       E12-C         12       11    1           25       10    15
   B&M       E11-D         10       15   -5           20       20     0
   Smig      XX2-12        Null     10   -10          20       20     0
   Cartri    WW0-E         etc...

Should I create a 3rd javabean that represents the view above from a SQL JOIN and do all the math in servlets (Or possibly in the SQL itself)?

Or do I pass the two beans and do the math in the jsp view? If I do the latter, I’m not sure how to do the looping efficiently with jstl. The two db tables may not have the exact same order or number of rows (as seen with the Null value in the SMIG contract above)

  • 1 1 Answer
  • 1 View
  • 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-23T04:09:18+00:00Added an answer on May 23, 2026 at 4:09 am

    In order of preference:

    1) Do it in the database,

    2) Do it in a POD (JavaBean)

    3) (A distant third) Do it in the JSP.

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

Sidebar

Related Questions

I have two tables that have the same structure; one contains permanaent data, and
I have a one to many relationship between two tables. The many table contains
I have two tables, one that contains volunteers, and one that contains venues. Volunteers
I have two tables. One table contains comments on posts, another contains commenter information
I have a database that contains two tables: entries tags The entries table contains
sqlite3 I have two tables. One contains some lists and the other contains each
I have two tables made in access. One table (Owner) contains: ownerID , name
I have two tables, one contains data like this: link_id | counted ================= 1--------|
I have two fields in a table. One contains values such as BTA, BEA,
I have two tables: one contains employees information and another is transactions (sales) information

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.