Sorry for my stupid question, but i didn't understand the problem.
My stored procedure: (Editable part of HeidiSql)
BEGIN DECLARE NewId TINYTEXT; DECLARE tbTab TINYTEXT;
SET tbTab = 'tbHouse';
FOR i IN REVERSE 0..(SELECT COUNT(*) FROM tbTab) DO
SET NewID = (CONCAT ('ID-', (CONVERT (i USING UTF8))));
IF (SELECT COUNT(*) FROM tbHouse WHERE HouseID = NewId) = 0 THEN RETURN NewID; END If;
END FOR;
RETURN 'ID-0000';
END
FOR i IN REVERSE 0..(SELECT COUNT(*) FROM tbHouse) DO =>> work's fine
ImmoDB_Kastrup.tbHouse exists and function works fine ImmoDB_Kastrup.tbTab does not exist - Yes, it is correct
I have to signal, that tbTab is a variable --- but how ???
Declaration with @ or $ or %% does not work ...
please can you help me - i'm searchig in the net for some hours, and i often found your page ...