Difference between revisions of "Change twp"
From TNG_Wiki
(Text replace - "<syntaxhighlight>" to "<syntaxhighlight lang="SQL">") |
|||
Line 5: | Line 5: | ||
Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk! | Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk! | ||
− | --------<syntaxhighlight> | + | --------<syntaxhighlight lang="SQL"> |
UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp.','Township'); | UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp.','Township'); | ||
UPDATE tng_families SET divplace = REPLACE(divplace,'Twp.','Township'); | UPDATE tng_families SET divplace = REPLACE(divplace,'Twp.','Township'); | ||
Line 17: | Line 17: | ||
-------- | -------- | ||
in case you use NO dot in Twp | in case you use NO dot in Twp | ||
− | --------<syntaxhighlight> | + | --------<syntaxhighlight lang="SQL"> |
UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp','Township'); | UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp','Township'); | ||
UPDATE tng_families SET divplace = REPLACE(divplace,'Twp','Township'); | UPDATE tng_families SET divplace = REPLACE(divplace,'Twp','Township'); |
Revision as of 16:02, 18 June 2011
Some people like to write twp where there is a township mentioned. This query changes that to Township. This query is intended if you already have everything set to Township but you import a gedcom where there are still twp's. In case you want to change the whole database you will have to replace the DELETE statement with UPDATE tng_places REPLACE (place, 'Twp.','Township'); in the first set of queries and to UPDATE tng_places REPLACE (place, 'Twp.','Township');
Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk!
UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp.','Township');
UPDATE tng_families SET divplace = REPLACE(divplace,'Twp.','Township');
UPDATE tng_people SET birthplace = REPLACE(birthplace,'Twp.','Township');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,'Twp.','Township');
UPDATE tng_people SET deathplace = REPLACE(deathplace,'Twp.','Township');
UPDATE tng_people SET burialplace = REPLACE(burialplace,'Twp.','Township');
UPDATE tng_events SET eventplace = REPLACE(eventplace,'Twp.','Township');
DELETE FROM `tng_places` WHERE `place` like "%Twp.%";
in case you use NO dot in Twp
UPDATE tng_families SET marrplace = REPLACE(marrplace,'Twp','Township');
UPDATE tng_families SET divplace = REPLACE(divplace,'Twp','Township');
UPDATE tng_people SET birthplace = REPLACE(birthplace,'Twp','Township');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,'Twp','Township');
UPDATE tng_people SET deathplace = REPLACE(deathplace,'Twp','Township');
UPDATE tng_people SET burialplace = REPLACE(burialplace,'Twp','Township');
UPDATE tng_events SET eventplace = REPLACE(eventplace,'Twp','Township');
DELETE FROM `tng_places` WHERE `place` like "%Twp.%";