G
Guest
I've inherited a database that relies heavily on a non normalized table.
Until I can convince the general manager that I can normalize the data
without losing any records, I've got to have a workaround for certain
situations. Namely, I need to ensure that data is not being badly reproduced
at various stages of our operations. I would therefore like to reference the
information directly from the main table in order to populate certain
information in related tables. In this case, the main table uses [Order
Number] as its primary key, and ties it to a bunch of information like
material type, alloy, form, etc., but there are up to four part numbers for
every order number. When we process these orders, these part numbers can get
separated and so we will have multiple parts from the same order in various
stages of production throughout the shop. I need a query that will return
all of the part numbers for every order number in a common field. In other
words, in its simplest form the query would have two fields, Order Number and
Part Number, and for every Order Number would produce four records in the
Part Number field. I'm not worried about null records at this time. Not
being an adept in SQL, I thought I'd ask the big brains here at the
newsgroup. Your help will be appreciated!
Until I can convince the general manager that I can normalize the data
without losing any records, I've got to have a workaround for certain
situations. Namely, I need to ensure that data is not being badly reproduced
at various stages of our operations. I would therefore like to reference the
information directly from the main table in order to populate certain
information in related tables. In this case, the main table uses [Order
Number] as its primary key, and ties it to a bunch of information like
material type, alloy, form, etc., but there are up to four part numbers for
every order number. When we process these orders, these part numbers can get
separated and so we will have multiple parts from the same order in various
stages of production throughout the shop. I need a query that will return
all of the part numbers for every order number in a common field. In other
words, in its simplest form the query would have two fields, Order Number and
Part Number, and for every Order Number would produce four records in the
Part Number field. I'm not worried about null records at this time. Not
being an adept in SQL, I thought I'd ask the big brains here at the
newsgroup. Your help will be appreciated!