If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Updating Fields with one charachter to another
I have 75 fields in a database that are all marked with either 'A', 'B' or
'C' or blank. I want to change all populated fields to a 'Y' so that I can see they they are associated to a group, but i dont want to be able to see what group they belong to. Each person in the database can belong to one or more of the 75 fields. How can I change these records without using Find/Replace. Craig |
#2
|
|||
|
|||
Updating Fields with one charachter to another
On Mon, 12 Feb 2007 17:23:13 -0500, "Craig"
wrote: I have 75 fields in a database that are all marked with either 'A', 'B' or 'C' or blank. Ow. You don't have a database. You have a spreadsheet! If each field's name is the name of a group, your database is incorrectly normalized. A much better design would have three tables: Persons PersonID Primary Key LastName FirstName other biographical data Groups GroupID Primary Key GroupName other info about the group as a whole, if needed Membership PersonID GroupID any info about this person's membership in this group, such as a text field containing A, B, or C, if you want to keep that info I want to change all populated fields to a 'Y' so that I can see they they are associated to a group, but i dont want to be able to see what group they belong to. Each person in the database can belong to one or more of the 75 fields. How can I change these records without using Find/Replace. If you want to *permanently and irrevocably* lose the distinction between A, B and C, you can run an Update query updating *all 75* fields to: IIF(IsNull([fieldname]), Null, "Y") using the seventy-five different fieldnames. I'd REALLY suggest stepping back and restructuring your database though; not only are queries going to be a real nightmare, but if you ever need to add or change a group, you'll need to restructure your table, all your queries, all your forms, and all your reports that use this table. If I'm misunderstanding your use of the terms "field" and "group" please post back... on rereading, I may well be, but if so I clearly don't understand your table structure. John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|