Hi
It's a very simple table with a sample of the data:
CREATE TABLE `tblir_saleshist` (
`ir_prodid` int(11) NOT NULL DEFAULT 100,
`ir_period` date NOT NULL,
`ir_qty` int(11) DEFAULT NULL,
`ir_val` float DEFAULT NULL,
`ir_cost` double GENERATED ALWAYS AS (`ir_val` / `ir_qty`) VIRTUAL,
`ir_netrev` float DEFAULT NULL,
`ir_netper` float GENERATED ALWAYS AS (`ir_netrev` * 100 / `ir_val`) VIRTUAL,
PRIMARY KEY (`ir_prodid`,`ir_period`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `tblir_saleshist`
--
LOCK TABLES `tblir_saleshist` WRITE;
/*!40000 ALTER TABLE `tblir_saleshist` DISABLE KEYS */;
INSERT INTO `tblir_saleshist` VALUES (100,'2018-01-31',9419,1648000,174.96549527550695,609000,36.9539),(100,'2018-02-28',9460,1656000,175.05285412262157,539000,32.5483),(100,'2018-03-31',11944,2090000,174.98325519089082,1017000,48.6603);
/*!40000 ALTER TABLE `tblir_saleshist` ENABLE KEYS */;
UNLOCK TABLES;
I manually recreated all the tables tables that have generated columns so I have the dbs copied.
A couple of things I stumbled over when doing this was:
- The 2 instances were not running the same mydbr versions
- The Stored Procedures had different creators - probalby to do with using root to do the importing instead of the mydbr account.
- A couple of reports fell over due to referencing temporary tables in same statement although this works in MariaDB.
Cheers and thanks
Jake