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

We'll soon have some high school kids here in our company for some training
We have a cloud based SaaS application and many of our customers (school systems)
We have a system that allows our parents (I work for a school district)
Our website has school info; when users login to our site with Facebook, we'd
The solutions for my school's assignments all have waterstamps on the PDFs with our
In our school, it is common to build games as class projects in implementing
I'm a beginning programmer and the I&CS program at our school starts us off
I am writing a small program for our local high school (pro bono). The
A simple description of our architecture for the school project we are doing: -we
The following code was been given from our school as a sample for circular

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.