ich habs raus!!!
falls es wen interessiert:
SQL-Code:
CREATE PROCEDURE GET_DICENTRIES_BY_ALL_ASDSKSRPT (
TKNID BIGINT,
ASDSKS VARCHAR(10000))
RETURNS (
IDOUT BIGINT)
AS
DECLARE VARIABLE TOKEN VARCHAR(10000);
DECLARE VARIABLE CNT BIGINT;
begin
select count(id) from tokenize(:asdsks, '.') into cnt;
if (:cnt = 0) then
for select id from dicentries into idout do
suspend;
else
begin
select tkn from tokenize(:asdsks, '.') where id = :tknid into token;
if (:cnt = :tknid) then
for select id from get_dicentries_by_asdskrpt(:token) into idout do
suspend;
else
for select id from get_dicentries_by_asdskrpt(:token) t1 inner join get_dicentries_by_all_asdsksrpt(:tknid + 1, :asdsks) t2 on t1.id = t2.idout into idout do
suspend;
end
end^
...aufzurufen mit GET_DICENTRIES_BY_ALL_ASDSKSRPT (1, ASDSKRPT)...
fehlt nur noch, dass mir einer von euch sagt, er hätte's gewusst
Um Rekursion zu verstehen, muss man zunächst Rekursion verstehen.