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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:21:17+00:00 2026-05-12T00:21:17+00:00

Our school’s ERP has a nasty database structure to it and since it is

  • 0

Our school’s ERP has a nasty database structure to it and since it is not normalized correctly, I have an issue with joining on the same table multiple times.

The DegreeHistory table has these columns in one row entry for a person:

|Major1|Major2|Major3|Minor1|Minor2|Minor3|
-------|------|------|------|------|------|
 CMPT                 BUSI

There is another table DegreeDescription:

|DegreeCode|DegreeDesc      |
-----------|-----------------
CMPT       |Computer Science
BUSI       |Business

I want a query shows a student’s degree history information but skips the degree codes and shows the degree description instead. Is there a way I can do this other than:

SELECT dd.DegreeDesc, dd1.DegreeDesc FROM DegreeHistory dh
LEFT JOIN DegreeDescription dd ON dd.DegreeCode = dh.Major1
LEFT JOIN DegreeDescription dd1 ON dd1.DegreeCode = dh.Major2 ...

For each of the possible majors, minors, concentrations, certifications, etc… Seems like a large and ugly query (though simple to do).

  • 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-12T00:21:17+00:00Added an answer on May 12, 2026 at 12:21 am

    You are in the right track, just a little change…:

    SELECT dd.DegreeDesc, dd1.DegreeDesc FROM DegreeHistory dh
    LEFT JOIN DegreeDescription ON DegreeCode = dh.Major1 dd
    LEFT JOIN DegreeDescription ON DegreeCode = dh.Major2 dd1 ...
    

    Certainly it’s ugly but that’s what you get with non-normalized structures 🙁

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

Sidebar

Related Questions

For our school project, we are tasked to define a design document describing the
Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding
Our EPOS system copies data by compressing the database into a zip file, and
Our application is interfacing with a lot of web services these days. We have
In our school, it is common to build games as class projects in implementing
I'm implementing our school's website using WordPress as CMS. So far, it works well
The following code was been given from our school as a sample for circular
I'm creating a contest sign-up page for our annual math competition at my school.
I'm a beginning programmer and the I&CS program at our school starts us off
Our company is currently writing a GUI automation testing tool for compact framework applications.

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.