Hello

you should to use a DECLARE statement

http://www.postgresql.org/docs/9.1/interactive/sql-declare.html

and fetch statement

http://www.postgresql.org/docs/9.1/interactive/sql-fetch.html

Regards

Pavel Stehule


2011/10/14 Alexander Farber <alexander.far...@gmail.com>:
> I've also tried opening cursor:
>
> quincy=> open ref for select to_char(qdatetime, 'YYYY-MM-DD') as
> QDATETIME,ID,NAME,CATEGORY,APPSVERSION,OSVERSION,DETAILS,DEVINFO from
> quincyview where qdatetime <= now() order by QDATETIME desc ;
> ERROR:  syntax error at or near "open"
> LINE 1: open ref for select to_char(qdatetime, 'YYYY-MM-DD') as QDAT...
>        ^
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

-- 
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