Page 1 of 1

how to execute SP with TZSQLProcessor

Posted: 20.11.2012, 09:53
by irw10062
please help me,
how to execute this script with TZSQLProcessor because its failed caused by string delimiter $$
and default is ;
drop table if exists mastergudangx;
CREATE TABLE `mastergudangx` (
`kd_gdg` varchar(20) NOT NULL,
`nm_gdg` varchar(20) NOT NULL,
`keterangan` varchar(30) DEFAULT NULL,
`kd_subdist` varchar(15) NOT NULL,
PRIMARY KEY (`kd_gdg`),
KEY `Index_mastergudangx_kd_subdist` (`kd_subdist`,`kd_gdg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 PACK_KEYS=0;

DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_update_tglpjp`()
BEGIN
replace into mastersetting select 'tglpjp', setting from mastersetting where nama_setting='tglgudang';
END $$
DELIMITER ;

Posted: 20.11.2012, 13:24
by EgonHugeist
irw10062,

Did you set TZSQLProzessor.DelimiterType = dtDelimiter? I use such scripts for my test and it works like expected.

Another thing i could imagine: Add a line ending(press enter) behind "end $$".

Can you vaidate this first?