Using Database manager

Family Mailing List, Personal Profiles, Activities and Skills, Attendance, Visitations

Using Database manager

Postby John Dykema » Fri Dec 28, 2018 3:51 pm

We use Date 6 and renamed it Deceased. We also keep dates when people come in (In-Date, Date 5) and when they leave (Out-date, Date 7).
I've discovered we have over 100 deceased people but the Out-date has been left blank.
I want to make anyone with a Deceased date copied into the Out-date field. This will save me a lot of keying.
Could you give me the commands to do this? Yes, I will backup the database before trying this :|
Thanks much.
John
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Database manager

Postby Zorak » Fri Dec 28, 2018 6:11 pm

The first thing you will need to know is what two digit Personal Status code represents "Deceased". You can find that by doing the following:

Code: Select all
USE MECODES
BROW FOR FIELD="STATUS" AND UPPER(DESCRIPT)="DECEASED"

We'll call that code value ZZ for this example. The next step will be first to run a query to make sure you get the list of records you are expecting.

Code: Select all
USE ME
BROW FOR STATUS="ZZ" AND NOT EMPTY(DATE6) AND EMPTY(DATE7)

You should see the list of over 100 deceased people with no Out-date assigned that you were seeing before. If not, then something is off in the logic and we'll need you to post back with more details. That query says the Personal Status code is "Deceased" and there is a Deceased date assigned, but no Out-date assigned.

If the list of people in that query is as you expected, do the following:

Code: Select all
REPL ALL DATE7 WITH DATE6 FOR STATUS="ZZ" AND NOT EMPTY(DATE6) AND EMPTY(DATE7)

That simply takes the same list of people from the last query and copies Deceased date into Out-date.
Zorak
Tech Support
Tech Support
 
Posts: 2536
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software

Re: Using Database manager

Postby John Dykema » Fri Dec 28, 2018 9:44 pm

Zorak, that worked slick as can be, what a time saver. Thanks much.
I then also tried to wipe out Date4 (renamed Married) with:
REPL ALL DATE4 WITH " " FOR STATUS ="DN" but then I get a data error. I also tried " / / " but no go. Could that be because dates are numeric fields? Please advise.
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Database manager

Postby Zorak » Sat Dec 29, 2018 8:58 am

I don't have access to PowerChurch at the moment to try this, but I believe the blank date equivalent is {}
Zorak
Tech Support
Tech Support
 
Posts: 2536
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software

Re: Using Database manager

Postby John Dykema » Sat Dec 29, 2018 10:50 am

You're the man Zorak. I thought it was a zero but once I figured out they are brackets it worked like a charm.
Thanks much. John D.
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church