Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Merge Two Tables with the same columns but different data

429125Jan 7 2005 — edited Feb 2 2005
I have a table that has the following columns:
Current Table Definition
commonname
family
genus
species
subspecies
code

I have a number of entries that don’t fit the current table definition – that is that they only have a common name or description and a code. These records don’t actually represent a species but are needed for data entry because they represent an object that may be encountered in the study (Bare Ground – which isn’t a species but would need to be recorded if encountered). So I would really like 2 tables:

Table 1 Miscellaneous
name
code

Table 2 Plant Species
commonname
family
genus
species
subspecies
code

I would like two tables so I can enforce certain constraints on my species table like requiring that the family, genus, species, subspecies combination is unique. I can’t do this if I have all the “other” records that don’t have a family, genus, species, or subspecies unless I put in a lot of dummy data into the fields to make each record unique. I don’t really want to do this because these miscellaneous records really don’t represent a specific species.

So – the problem is that while I want this data separate I will need to point a column from another table to the code column in both tables.

How is this best done? Table? View? Merge?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2005
Added on Jan 7 2005
7 comments
2,020 views