Hi

I have example:

rnum := 0;
FOR r IN EXECUTE ''SELECT *
    FROM ''||table_name||''
    WHERE var = ''||var
LOOP
    IF rnum = 0 THEN
        -- how could I get the count of records here ???
        -- I tried GET DIAGNOSTICS rcount = ROW_COUNT;
        -- BUT it returns ZERO = 0 :(
    END IF;
    rnum := rnum + 1;
END LOOP;

-- here I will get count of records in "rnum", but I need in LOOP's
-- first step

Many thanx from Zet


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to