On Fri, 21 Jul 2006, Kevin Nikiforuk wrote:
> Many thanks to Stephan, Richard and George. When I was reading the
> documentation about FOR loops, I didn't realize that I was in the plpgsql
> section!
>
> CREATE OR REPLACE FUNCTION rgio() RETURNS integer as $$
> BEGIN
> DECLARE lv RECORD
"Kevin Nikiforuk" <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION rgio() RETURNS integer as $$
> BEGIN
> DECLARE lv RECORD;
> FOR lv IN SELECT DISTINCT rg FROM ldevrg LOOP
> SELECT ldev FROM ldevrg WHERE ldevrg='$lv';
> END LOOP;
> RETURN 1;
> END;
>
am 21.07.2006, um 9:26:21 -0600 mailte Kevin Nikiforuk folgendes:
> Many thanks to Stephan, Richard and George. When I was reading the
> documentation about FOR loops, I didn't realize that I was in the plpgsql
> section!
>
> CREATE OR REPLACE FUNCTION rgio() RETURNS integer as $$
> BEGIN
>
AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Error when trying to use a FOR loop
Sorry if this is in the archives, but I've done a search and couldn't find
anything relevant. I'm running HP's precompiled version of 8.1.3.1 as part of
their Internet Express offering, and I c
- Original Message From: "Kevin Nikiforuk"
xp512-0715-0716=# FOR LV in 1..10 LOOP
It appears that you are trying to use the For .. Loop structure from the
psql command line. This structure is not plain SQL - its meant to be used
within PL/pgSQL. Have you tried incorporating it int
> Sorry if this is in the archives, but I've done a search and couldn't find
> anything relevant.
> I'm running HP's precompiled version of 8.1.3.1 as part of their Internet
> Express offering, and
> I can't seem to run a for loop. Here's what I'm seeing:
> xp512-0715-0716=# FOR LV in 1..10 LOOP
On Thu, 20 Jul 2006, Kevin Nikiforuk wrote:
> Sorry if this is in the archives, but I've done a search and couldn't
> find anything relevant. I'm running HP's precompiled version of 8.1.3.1
> as part of their Internet Express offering, and I can't seem to run a
> for loop. Here's what I'm seeing:
Sorry if this is in the archives, but I've done a search and couldn't find
anything relevant. I'm running HP's precompiled version of 8.1.3.1 as part of
their Internet Express offering, and I can't seem to run a for loop. Here's
what I'm seeing:
xp512-0715-0716=# FOR LV in 1..10 LOOP
xp512-071