Couldn’t call stored procedure with temporary table:
DELIMITER $$
DROP PROCEDURE IF EXISTS `summary_daily_reports`$$
CREATE PROCEDURE `summary_daily_reports`()
BEGIN
DROP TEMPORARY TABLE IF EXISTS `both_daily_repots`;
CREATE TEMPORARY TABLE both_daily_repots(
`date` VARCHAR(10),
balance DOUBLE,
balance_ua DOUBLE
) DEFAULT CHAR SET utf8;
INSERT INTO both_daily_reports VALUES ('2012-01-01',0,0);
SELECT * FROM both_daily_repots;
END $$
Then i call procedure and get error “Table ‘report_cfd.both_daily_reports’ doesn’t exist”;
In a few places you spell the table name as
both_daily_repotsinstead ofboth_daily_reports. This is what’s causing the error.What happens is that:
DROP TABLE,CREATE TABLEandSELECToperate onrepots(without ther);INSERTtries to insert intoreports(with ther) and fails.