-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               5.5.5-10.0.12-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             8.3.0.4694
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- Dumping database structure for errtest
CREATE DATABASE IF NOT EXISTS `errtest` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `errtest`;


-- Dumping structure for table errtest.all_data_concise
CREATE TABLE IF NOT EXISTS `all_data_concise` (
  `POLICY_NUMBER` varchar(9) DEFAULT NULL,
  `AGE_NEXT_BIRTHDAY` int(10) DEFAULT NULL,
  `RATE_CODE` varchar(3) DEFAULT NULL,
  `COMMENCEMENT_DATE` date DEFAULT NULL,
  `ASSESSMENT_DATE` varchar(8) DEFAULT NULL,
  `PREMIUM_RATE` varchar(1) DEFAULT NULL,
  `SURNAME` varchar(44) DEFAULT NULL,
  `INITIALS` varchar(4) DEFAULT NULL,
  `DATE_OF_BIRTH` date DEFAULT NULL,
  `RACE` varchar(1) DEFAULT NULL,
  `SEX` varchar(1) DEFAULT NULL,
  `OCCUPATION` varchar(6) DEFAULT NULL,
  `REASSURANCE_POLICY_NUMBER` varchar(8) DEFAULT NULL,
  `TABLE` varchar(4) DEFAULT NULL,
  `INDEX_COVER` varchar(3) DEFAULT NULL,
  `DUE_TO_OPTION` varchar(1) DEFAULT NULL,
  `EXTRA_MORTALITY` varchar(5) DEFAULT NULL,
  `TRANSACTION` varchar(3) DEFAULT NULL,
  `REASSURANCE_COMMENCEMENT_DATE` date DEFAULT NULL,
  `DATE_OF_MOVEMENT` date DEFAULT NULL,
  `POLICY_CONVERSION` varchar(1) DEFAULT NULL,
  `INCEPTION_DATE` varchar(1) DEFAULT NULL,
  `OCCUPATIONAL_LOADING` varchar(5) DEFAULT NULL,
  `TEMPORARY_MEDICAL_LOADING` varchar(5) DEFAULT NULL,
  `PERCENTAGE_CATEGORY_1` varchar(5) DEFAULT NULL,
  `TAX_CATEGORY` varchar(1) DEFAULT NULL,
  `AIDS_RATE_CODE` varchar(5) DEFAULT NULL,
  `DISABILITY_FACTOR` varchar(5) DEFAULT NULL,
  `NAMIBIAN_CURRENCY` varchar(1) DEFAULT NULL,
  `NAME_CODE_FOR_SECOND_LIFE` varchar(8) DEFAULT NULL,
  `DATE_OF_CHANGE` date DEFAULT NULL,
  `PRODUCT_CODE` varchar(1) DEFAULT NULL,
  `DISCOUNT_PERCENTAGE_FOR_TOPCOVER` varchar(5) DEFAULT NULL,
  `BENEFIT_ELEMENT_NUMBER` int(10) DEFAULT NULL,
  `BENEFIT_INDICATOR` varchar(9) DEFAULT NULL,
  `SUM_ASSURED` double DEFAULT NULL,
  `SUM_AT_RISK_REASSURED` double DEFAULT NULL,
  `PREMIUM` double DEFAULT NULL,
  `EXTRA_PREMIUM_MEDICAL` double DEFAULT NULL,
  `EXTRA_PREMIUM_REST` double DEFAULT NULL,
  `COMMISSION_PREMIUM` double DEFAULT NULL,
  `COMMISSION_EXTRA_PREMIUM` double DEFAULT NULL,
  `BASIC_TERM` int(10) DEFAULT NULL,
  `DI_TERM` int(10) DEFAULT NULL,
  `DRE_TERM` int(10) DEFAULT NULL,
  `OLV_TERM` int(10) DEFAULT NULL,
  `OE_BASIC_TERM` int(10) DEFAULT NULL,
  `OE_DI_TERM` int(10) DEFAULT NULL,
  `OE_KT_TERM` int(10) DEFAULT NULL,
  `OP_TERM` int(10) DEFAULT NULL,
  `OPTIONS_BASIC_TERM` int(10) DEFAULT NULL,
  `OPTIONS_DI_TERM` int(10) DEFAULT NULL,
  `OPTIONS_KT_TERM` int(10) DEFAULT NULL,
  `ACCELERATOR_FACTOR` varchar(3) DEFAULT NULL,
  `AREA_FOR_FUTURE_USE_2` varchar(1) DEFAULT NULL,
  `CATEGORY_3` varchar(1) DEFAULT NULL,
  `BASIC_RATE_GROUP` varchar(2) DEFAULT NULL,
  `DISABILITY_RATE_GROUP` varchar(2) DEFAULT NULL,
  `AIDS_RATE` varchar(5) DEFAULT NULL,
  `AIDS_BASIC_PREMIUM` double DEFAULT NULL,
  `AIDS_COMMISSION` double DEFAULT NULL,
  `AGE_ADJUSTMENT_MORTALITY` varchar(4) DEFAULT NULL,
  `AGE_ADJUSTMENT_TRAUMA` varchar(4) DEFAULT NULL,
  `AGE_ADJUSTMENT_DISABILITY` varchar(4) DEFAULT NULL,
  `AGE_ADJUSTMENT_FOR_GENDER` varchar(3) DEFAULT NULL,
  `AGE_ADJUSTMENT_FOR_SUPER_LIVES` varchar(5) DEFAULT NULL,
  `MORTALITY_RATE_CODE` varchar(5) DEFAULT NULL,
  `TRAUMA_RATE_CODE` varchar(5) DEFAULT NULL,
  `DISABILITY_RATE_CODE` varchar(5) DEFAULT NULL,
  `AIDS_STATUS` varchar(3) DEFAULT NULL,
  `MaxMonth` varchar(10) DEFAULT NULL,
  `MinMonth` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.


-- Dumping structure for table errtest.q01e genders
CREATE TABLE IF NOT EXISTS `q01e genders` (
  `POLICY_NUMBER` varchar(9) DEFAULT NULL,
  `SURNAME` varchar(255) DEFAULT NULL,
  `INITIALS` varchar(255) DEFAULT NULL,
  `DATE_OF_BIRTH` datetime DEFAULT NULL,
  `MCount` double DEFAULT NULL,
  `FCount` double DEFAULT NULL,
  `GenderToUse` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.


-- Dumping structure for table errtest.q04d final snapshot reference
CREATE TABLE IF NOT EXISTS `q04d final snapshot reference` (
  `POLICY_NUMBER` varchar(9) DEFAULT NULL,
  `DATE_OF_BIRTH` datetime DEFAULT NULL,
  `SEX` varchar(255) DEFAULT NULL,
  `BENEFIT_INDICATOR` varchar(255) DEFAULT NULL,
  `MaxMonthToUse` varchar(255) DEFAULT NULL,
  `TermDate_to_use` datetime DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
