Scott Schulthess wrote:
How do I get this to work?

for r in SELECT distinct(substring(drgtitle, 1, 1)) as text from
stockdrgmeta where state ilike '%' || $1 || '%'


loop variable of loop over rows must be record or row variable at or
near "LOOP" at character 218


DECLARE
        r RECORD;
BEGIN
        FOR r IN ...
                RETURN NEXT r.text

--
  Richard Huxton
  Archonet Ltd

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

Reply via email to