Hi,
Quick thanks for the last response.
I am needing to UPDATE 2000 records in the ME table, matching on the LASTNAME and FIRSTNAME columns and updating the BORN column. I have the my UPDATE working (one at a time), but I have 2000 to execute. I've tried various syntax but I'm finding the proper one. Could you help me?
Here is a sample of my UPDATE:
UPDATE ME SET BORN = {^1962-09-18} WHERE UPPER(LASTNAME) = 'ZACHARY' AND UPPER(FIRSTNAME) = 'PAUL'
Thanks again,
Gary
DatabaseManager - SQL - Multiple Statements Possible?
Moderators: Moderators, Tech Support
-
- Posts: 3
- Joined: Wed Apr 21, 2004 4:40 pm
- Location: Liberty Church
- Contact:
DatabaseManager - SQL - Multiple Statements Possible?
Gary Fanning
Liberty Church
Tech Support
Liberty Church
Tech Support
-
- Posts: 3
- Joined: Wed Apr 21, 2004 4:40 pm
- Location: Liberty Church
- Contact:
DatabaseManager - SQL - Multiple Statements Possible?
I have 1900 birth dates from RDS, the system we migrated from, that I want to update records in PowerChurch. We had imported the information allowed at an earlier time. I have lastname and firstname to match with and the birth date to add (update).
Not in another table, was CSV and I have edited each row to create an UPDATE statement. The birth dates have been modified for VFP. So now I have 1900 UPDATE statements that I want to execute; just don't want to run each one at a time.
Gary
Not in another table, was CSV and I have edited each row to create an UPDATE statement. The birth dates have been modified for VFP. So now I have 1900 UPDATE statements that I want to execute; just don't want to run each one at a time.
Gary
Gary Fanning
Liberty Church
Tech Support
Liberty Church
Tech Support
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
Gary,
To make sure I understand, you have a text file with 1900 update statements in it and you want to run each one of them without copying each one and pasting it into the database manager command window?
If this is the case, you can do the following:
Give the file name a .prg extension. ie. RunMe.prg
Copy the runme.prg into the PCPLUS folder.
From the command window type: COMPILE RUNME.PRG <Enter>
In the upper right hand corner of the screen, you will see a status window that should say 1 file, 0 errors.
If errors were reported, you can see where the error was by typing: MODI COMM RUNME.ERR <Enter>
If needed fix any errors and complete the above steps again. You can edit the file right in PCPLUS by typing MODI COMM RUNME <Enter>
If it compiles without errors, run the program with: DO RUNME <Enter>
Needless to say, make a backup before you do this. Just in case anyone else is reading this, this is an extremely advanced topic and should not be done unless you really know what you are doing. Also, this is also outside of normal PowerChurch Support. We don't usually offer advice or support on running external program to update PowerChurch Plus data.
To make sure I understand, you have a text file with 1900 update statements in it and you want to run each one of them without copying each one and pasting it into the database manager command window?
If this is the case, you can do the following:
Give the file name a .prg extension. ie. RunMe.prg
Copy the runme.prg into the PCPLUS folder.
From the command window type: COMPILE RUNME.PRG <Enter>
In the upper right hand corner of the screen, you will see a status window that should say 1 file, 0 errors.
If errors were reported, you can see where the error was by typing: MODI COMM RUNME.ERR <Enter>
If needed fix any errors and complete the above steps again. You can edit the file right in PCPLUS by typing MODI COMM RUNME <Enter>
If it compiles without errors, run the program with: DO RUNME <Enter>
Needless to say, make a backup before you do this. Just in case anyone else is reading this, this is an extremely advanced topic and should not be done unless you really know what you are doing. Also, this is also outside of normal PowerChurch Support. We don't usually offer advice or support on running external program to update PowerChurch Plus data.