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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:55:19+00:00 2026-05-25T13:55:19+00:00

First off the two lists hold different sets of data, however through some combining

  • 0

First off the two lists hold different sets of data, however through some combining of variables in the get method eventually hold the same type of data. The end goal is to populate a drop down with both lists sorted together based on their names (description).

The basic is that there are TWO tables holding the type of data, but holding it so differently that it’s virtually impossible to write a good SQL statement to get it out. The end result is a “name” or “nameIndex” object.

Both have an indexcode, but that is not related to the opposing table, it IS related to what is stored in a third table that needs to be updated with this code. The codes will never match between tables (one is two characters long, the other 3 or more).

How do I combine these two lists into a dropdown for the user so that the value of the dropdown is the indexcode and the description displayed as the label?

Example:

<html:select property="name">
   <html:optionsCollection name="nameList" label="nameDescription" value="nameCode" />
</html:select>

<html:select property="nameIndex">
   <html:optionsCollection name="nameIndexList" label="nameIndexDescription" value="nameIndexId.nameCode" />
</html:select>

(note the “nameIndexId.nameCode” value) into this:

<html:select property="allNames">
   <html:optionsCollection name="allNames" label="nameDescription" value="nameCode" />
</html:select>
  • 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-25T13:55:19+00:00Added an answer on May 25, 2026 at 1:55 pm

    While virtually impossible, it was not completely impossible. I created a view in SQL to pull both lists at once with the data I needed, here is my answer:

    CREATE OR REPLACE VIEW FULL_NAME_LIST_VIEW AS SELECT 
        N.NAME_ID AS ID, 
        N.DISPLAY DISPLAY,
        'BOSS' TYPE
    FROM NAME N
    UNION
    SELECT 
        NI.NAME_INDEX_ID AS ID,
        (FIRST.DISPLAY || ' - ' || LAST.DISPLAY) AS DISPLAY,
        NI.TYPE_ID TYPE
    FROM NAME_INDEX NI,
         NAMEHOLDER FIRST,
         NAMEHOLDER LAST
    WHERE NI.FIRST_ID = FIRST.NAME_ID
    AND NI.LAST_ID = LAST.LAST_ID;
    

    This will create a view which you cal pull like any normal table for values of ID, DISPLAY and TYPE. It’s probably not an often run into problem, but this is a good solution for anyone who runs into junk like this in the future when you can’t change the data structure.

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

Sidebar

Related Questions

First off, I'm working on an app that's written such that some of your
I have two Drop Down Lists, the second ones are based off which one
First off, according to http://msdn.microsoft.com/en-us/library/x0b5b5bc.aspx , the List.Find method is only listed as throwing
I'm running a MYSQL query in two steps. First, I get a list of
I have two different collections: List<int> IEnumerable<IDataRecord> The first contains a list of primary
First off, I am using Windows XP. I have multiple hard drives and it
First off, I understand the reasons why an interface or abstract class (in the
First off if you're unaware, samba or smb == Windows file sharing, \\computer\share etc.
First off, there's a bit of background to this issue available on my blog:
First off: I'm using a rather obscure implementation of javascript embedded as a scripting

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.