Hi,

I have a problem with Mysql query browser.
I have :

DELIMITER $$
DROP PROCEDURE IF EXISTS `TESTO` $$
CREATE PROCEDURE `TESTO`()
BEGIN
DECLARE i INT DEFAULT 0;
DECLARE KIEKIS INT DEFAULT 0;
SET KIEKIS=(SELECT COUNT(KODAS) FROM ISSS_SR I);
WHILE i<1 DO
PREPARE uzklausa FROM 'SELECT KODAS, RF FROM ISSS_SR LIMIT ?, 1 into @KODAS_1, @FORMULE';
SET @a = i;
EXECUTE uzklausa using @a;
PREPARE uzklausa3 FROM 'UPDATE ISSS_SR SET SR=@FORMULE WHERE KODAS=@KODAS_1';
EXECUTE uzklausa3;
SET i=i+1;
DEALLOCATE PREPARE uzklausa;
DEALLOCATE PREPARE uzklausa3;
END WHILE;
END $$
DELIMITER ;

Calculates the "SR" where "@FORMULE":
SELECT(SELECT
SUM(SR) FROM ISSS_ATASKAITA
WHERE DUOM_TIPAS=2 AND STRAIPSNIS = 292 AND SEKTORIUS= 'S1312' AND PRIEMONE='F7') + (SELECT
SUM(SR) FROM ISSS_ATASKAITA_F06
WHERE DUOM_TIPAS=2 AND STRAIPSNIS = 3040 AND SEKTORIUS= 'S1314' AND PRIEMONE='F99')

Every code is different from the query. Now, with a request for me to "SR" column, not "@ FORMULA" answer, but just the same formulas.
Do you have any tips on how to do that I first counted and then recorded in response to SR.