labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_AuditProcess
Parameters
Name
Type
Mode
CID
int
IN
Definition
BEGIN DECLARE done INT DEFAULT 0; DECLARE x INT DEFAULT 0; DECLARE a VARCHAR(20); DECLARE b VARCHAR(10000); DECLARE cur1 CURSOR FOR select Name from processes where computerid=CID; DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; OPEN cur1; set b=' '; REPEAT FETCH cur1 INTO a; set b=concat(b,',',a); UNTIL done end REPEAT; CLOSE cur1; Delete from processes where computerid=CID; return b; END