This is from the Tutorial for version 6.4 of PostgreSQL.
FETCH [ selector ] [ count ]
{ IN | FROM } cursor
FETCH [ RELATIVE ] [ { [ # | ALL | NEXT | PRIOR ] } ]
FROM ] cursor
I think ' { IN | FROM } ' means that you must type IN or FROM
-Margarita
On Wed, 28 Apr 1999, Artur Pietruk wrote:
> On Wed, Apr 28, 1999 at 10:11:21AM -0400, Margarita Barvinok wrote:
> >
> > This work for me:
> >
> > EXEC SQL FETCH 1 IN exam_cur INTO :ex_id, :wday;
> > ^^^^
> > I think it must work without '1' also.
>
> Thank's a lot! I didn't expect it... It works with 'exec sql fetch
> FROM...' too... My SQL book says that 'FROM' is optional (and it was
> optional in pgsql6.3, when i switch to 6.4 it didn't work). Is it ecpg
> bug, or error in my sql-book?
>
> --- Artur Pietruk, [EMAIL PROTECTED]
>
>