Thank you for your suggestions. I was able to fix this using the database manager, without any issues. I included what I did, for anyone else who might find themselves in a similar quandry.
NB / Disclaimer: Before running any commands in the Database Administrator, BACKUP YOUR DATA. It is possible to both corrupt PowerChurch and to make it do exactly what you want with the Administrator; I hope that you do the latter, but I am not responsible if
you do the former. The queries below are exactly what I used, and things worked fine for me, but I am not liable for their use or misuse or any damages resulting from such activity. Whew.
1. Entered the DB Administrator.
2. I knew I was going to be working with the "MA" (Family Mailing List) table, but I didn't know what fields. A good old-fashioned SELECT told me what I needed to know:
3. Great. If you read the previous posts, I was after switching all records with a certain Special Code into a certain mailing category. First task then was the find the column that contained this Special Code. The column I was after I found to be titled "Special1."
4. To confirm that I had the right field name, I checked the number of entries that contained the value I was expecting ("CR") with this query:
Code: Select all
SELECT COUNT(Special1) FROM MA WHERE Special1 = "CR"
5. 4018 entries. Perfect. I have the right field. Now I needed to figure out which field linked people with a Mailing Category. Ran the "SELECT" statement from Step 2 again. I guessed it was the field named "Category."
6. So, now I needed to find out which tables linked the Category names with the category codes which appear in the MA table. You can find these in the MACODES table, which I learned from the PC website, here: (I tried adding the URL here, but the forum won't allow me to. Email me for a link, or just search for "tables" in the PowerChurch knowledge base.)
7. A "SELECT *" on the MACODES showed that the table contained a field named "Field." All the entries titled "Category" had descriptions that matched mailing categories, so I assumed I had found it. I found the mailing category I was after, noted its code ("FC") and prepared to make some changes to the database.
8. I used a simple UPDATE statement to add all the records that had a specific Special1 code to this mailing category.
Code: Select all
UPDATE MA SET Category = "FC" WHERE Special1 = "CR"
9. Easy enough. Nothing crashed, and I didn't get any errors. To check that the query operated as expected, I queried to see the number of records that were now linked to the "FC" Mailing Category:
Code: Select all
SELECT COUNT(Category) FROM MA WHERE Category = "FC"
10. I was surprised, because the query returned 4,095; 77 more records than I expected. I suspected that there had already been some records that were specified under the "FC" mailing category, that did not have the Special1 code of "CR." I ran this query, to confirm:
Code: Select all
SELECT COUNT(Category) FROM MA WHERE Category = "FC" and Special1 != "CR"
11. Sure enough, the query returned a count of 77. This answer confirmed my suspicions.
12. Just to confirm that everything was still in tact, I exited the DB Administrator and checked a few entries in the Mailing List, through the PC main interface. Everything looked fine, and records were grouped in the correct mailing categories.