Usage of function retruning record in query

Поиск
Список
Период
Сортировка
От gmb
Тема Usage of function retruning record in query
Дата
Msg-id 1309762075448-4549140.post@n5.nabble.com
обсуждение исходный текст
Список pgsql-sql
Hi I have a stored function returning a record consisting of two field, and receiving as input a single identifier:
CREATEFUNCTION calcvalues(IN itemid VACHAR, OUT calcval1 NUMERIC, OUT calcval2 NUMERIC) RETURNS record... Now, I want
touse this function in a query as follows: SELECT itemid, calcvalues(itemid) FROM itemlist; which returns: itemid |
calcvalues--------+------------- 4 | (0.67,10.00) 5 | (1.55,45.00) 6 | (3.60,69.00) Now, how should I go about to give
thefollowing output: itemid | calcval1 | calcval2 --------+----------+---------- 4 | 0.67 | 10.00 5 | 1.55 | 45.00 6 |
3.60| 69.00 Any feedback will be appreciated. <br /><hr align="left" width="300" /> View this message in context: <a
href="http://postgresql.1045698.n5.nabble.com/Usage-of-function-retruning-record-in-query-tp4549140p4549140.html">Usage
offunction retruning record in query</a><br /> Sent from the <a
href="http://postgresql.1045698.n5.nabble.com/PostgreSQL-sql-f2142323.html">PostgreSQL- sql mailing list archive</a> at
Nabble.com.<br/> 

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

Предыдущее
От: Andreas
Дата:
Сообщение: Re: How to remove a set of characters in text-columns ?
Следующее
От: Harald Fuchs
Дата:
Сообщение: Re: Usage of function retruning record in query