On 26/10/17 15:00, Marcio Farah wrote:
Good morning for all

I´m beginer in PL/pgSQL functions and I have one difficulty. The function bellow should return many records but return just one. The loop just do the first INSERT INTO and get out.


If you run

  SELECT substring(cd_geocmu,1,6)::int AS cod_mun FROM
  geo_politico.g_br_municipios
  WHERE substring(cd_geocmu,1,2)::int = num

by itself (with a suitable value of "num"), do you get more than one row?

Also, what is the definition of the function parametros.calcula_parametros()?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
r...@iol.ie


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to