September 29th, 2012, 08:33 PM
Distinct values across 2 tables
Hi all. will try to explain this as simply as possible :
i have a table named "casetypes" with a field "name";
i have another table called "legacyCasetypes" with a field "casetype";
i want to populate a dropdown list to have all of the values from the casetypes table, AS WELL AS all unique values from legacy casetypes. so in pseudo code, i want something like :
select distinct casetypes from legacyCasetypes, name from casetypes, combine them as "dropdownValues" into new table
or maybe there's a better mechanism, but essentially i want a laundry list of all current casetypes and all old ones still in the old table, all in one dropdown.
don't need to know how to dynamically populate the dropdown, can do that already, i just need help with the SQL statement to paste together the data i want
September 29th, 2012, 08:54 PM
SELECT casetype AS dropdownValues
September 30th, 2012, 01:46 PM
thanks a million Rudy, worked like a charm. you are definitely "the man". elegant and simple solution. thanks bud.