NetBull
Erfahrenes Mitglied
Hi,
hab da folgendes Problem:
Wäre klasse wenn mir einer mal auf die Sprünge helfen könnte.
Die zeile "SELECT id FROM testSuite LIMIT currentRow, 1 into currentId;" mag das currentRow nicht. Was mache ich hier falsch?
LG deAndro!
hab da folgendes Problem:
Wäre klasse wenn mir einer mal auf die Sprünge helfen könnte.
Code:
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`dbCopy`@`%` PROCEDURE `fillTestTable`()
BEGIN
DECLARE rowCount INT;
DECLARE currentRow INT;
DECLARE currentName VARCHAR(255);
DECLARE currentId INT;
SET rowCount = (select count(*) from testSuite);
SET currentRow = 1;
SET currentId = 0;
testSuites:WHILE(currentRow < rowCount+1) DO
SELECT id FROM testSuite LIMIT currentRow, 1 into currentId;
SET currentRow = currentRow + 1;
#SELECT left(name, instr(name, ".xml")-1) FROM testSuite LIMIT currentRow, 1 into currentName;
#select concat("1. try on ", currentName, " with ID#", currentId, "on row #", currentRow);
#UPDATE test SET testSuiteId = currentId WHERE testName = currentName;
end while testSuites;
END
LG deAndro!