Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem loading sql into new database
08-10-2015, 04:50 AM,
#1
problem loading sql into new database
when loading old sql (MySQL 5.?) into a new one (Bitnami stack 5.5), I get the following sql error:

any idea what this means?

any help is appreciated,

Klaus

SQL query:


--
-- Constraints for table `chartdetails`
--
ALTER TABLE `chartdetails`
ADD CONSTRAINT `chartdetails_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`),
ADD CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`);



MySQL said: Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`we_150809`.`#sql-acc_36`, CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`))
Reply


Messages In This Thread
problem loading sql into new database - by opto - 08-10-2015, 04:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)