Re: [SQL] plpgsql and for with integer loopvar error

2005-01-17 Thread Stephan Szabo
On Sat, 15 Jan 2005, Ari Kahn wrote: > CREATE FUNCTION gets_nooky() returns numeric AS > ' > DECLARE > i integer; > gt1cnt record; > gt1 record; > cluster record; > cluster_cnt integer; > slocus integer; > minmax record; > > BEGIN > SELECT INTO gt1 * FROM c

[SQL] plpgsql and for with integer loopvar error

2005-01-17 Thread Ari Kahn
I have a single column result that I want to loop through using an index. I also want to jump ahead in the result using the index (below: i:=i+cluster_cnt-1;) . However, I'm getting the following error. ERROR: syntax error at or near "SELECT" at character 9 CONTEXT: PL/pgSQL function "gets_noo