Quote:
Originally Posted by Dave
I have a table with about 400 fields, but there is a series of fields entitled n1, n2...n50. IOW, there are 50 "consequtively named" fields.
|
Sounds like you have an unnormalised database...
Without seeing the field list and all the business logic, it's hard to normalise things for you of course, but if you have a number of columns called n1, n2, n3, etc, I'd guess that you should be normalising these into another table, with the main table's unique id as a foreign key in the new table.
One of the classic examples of unnormalised data that can lead to multiple columns like this is a person and their children
this is the wrong way to do it.
person (id, name, childname1, childname2, childname3, childname4, childname5, childname6....childnameN}
the correct way is like this
person {id, name,}
child (personID, childname)
variations on this:-
person (id, name)
teleNo (personID, tnumber)
business (id, name)
store (businessID, location)
movie (id, name)
actor (movieID, name)
and so on.
So, revisit your database design now, before you get too far into this problem, as it sounds like the design is wrong.