Error while export 2
| User, date | Message |
|---|---|
|
Written by sergtop
3 years ago Category: General 50 posts since Mon, 23 Nov 09 |
when exporting routine create sql query seems to be incorrect generated code is [localhost] DELIMITER // CREATE DEFINER=`user`@`%` PROCEDURE `timespopulate`(IN `startdate` DATETIME, IN `num` INT) BEGIN DECLARE ctr INT DEFAULT 0; WHILE ctr < num DO BEGIN INSERT INTO dates (`date`) VALUES ( DATE_ADD( startdate, INTERVAL ctr day) ); SET ctr = ctr + 1; END; END WHILE; END// DELIMITER ; /* [localhost] SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER // CREATE DEFINER=`user`@`%` PROCEDURE `timespopulate`(IN `startdate' at line 1 */ |
|
Written by ansgar
3 years ago 3973 posts since Fri, 07 Apr 06 |
Seems your target server (where you import the file) doesn't support the DELIMITER command. Which server versions (source + targert)? |
|
Written by sergtop
3 years ago 50 posts since Mon, 23 Nov 09 |
source - 5.0.45 target - 5.0.45 |
|
Written by ansgar
3 years ago 3973 posts since Fri, 07 Apr 06 |
I see. Very special case here with the DELIMITER. That's only for cases in which HeidiSQL executes queries in another database or server. In other cases, these DELIMITER xyz clauses get parsed. Should get some workaround. |
|
Written by ansgar
3 years ago 3973 posts since Fri, 07 Apr 06 |
Fixed |
|
Please login to leave a reply, or register at first. |