Name

rebuild_automdates — rebuild the automatic Mdates for an individual

Synopsis

int rebuild_automdates ( sname);  
char(3) sname ;
 

Input

sname

A Sname.

Description

This procedure rebuilds the automatic Mdates on the CENSUS table for a specific individual.

Warning

This routine should not be run while triggers (automatic data validation) are enabled.

Example

-- Turn off triggers by e.g.:
--   cd db/triggers
--   make BABASE_DB=babase_foo destroy
BEGIN;
-- Empty those tables that could refer to automdates.
DELETE FROM cycstats WHERE sname = 'FOO';
DELETE FROM mmintervals WHERE sname = 'FOO';
DELETE FROM mdintervals WHERE sname = 'FOO';
SELECT rebuild_all_automdates();
-- Commit so that triggers can be re-installed.
COMMIT;
-- Re-install trigges by e.g.:
--   cd db/triggers
--   make BABASE_DB=babase_foo install
BEGIN;
-- Rebuild the cycles.seq and cycles.series columns
SELECT rebuild_cycles('FOO');
-- Rebuild the tables temporarly emptied.
SELECT rebuild_cycstats('FOO');
SELECT rebuild_mmintervals('FOO');
SELECT rebuild_mdintervals('FOO');
COMMIT;


Page generated: 2016-07-22T23:08:46-04:00.