Cursors in Functions

Поиск
Список
Период
Сортировка
От Dirk Elmendorf
Тема Cursors in Functions
Дата
Msg-id XFMail.980812153129.delmendo@cymitar.net
обсуждение исходный текст
Список pgsql-sql
Is there any way to use cursors inside of functions?
I keep trying
CREATE FUNCTION first_purchased_product(int4)
returns text
as 'BEGIN; DECLARE mycursor cursor for SELECT true from product_order_table where customer
_number= $1 order by sec_last_mod ASC ;fetch 1 in mycursor; END;'
LANGUAGE 'sql';

But it won't let me- I need to get 1 product purchased....Anyone know the best way to acco
mplish this?
_________________________________________________________
Dirk Elmendorf, VP/Development           Main: 210-892-4000
Cymitar Technology Group, Inc.         Direct: 210-892-4005
Lorene Office Plaza                       Fax: 210-892-4329
9828 Lorene Lane                   <http://www.cymitar.com>
San Antonio, TX 78216-4450           <delmendo@cymitar.com>
_________________________________________________________



В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [SQL] returning the current date in a SQL query
Следующее
От: Walt Bigelow
Дата:
Сообщение: Re: [SQL] returning the current date in a SQL query