Clarified Question

Поиск
Список
Период
Сортировка
От stef@chronozon.dyndns.org (Stef telford)
Тема Clarified Question
Дата
Msg-id 20000524013643.C37C31F57C@chronozon.dyndns.org
обсуждение исходный текст
Список pgsql-sql
Hello,Earlier I sent in some ramblings trying to explain my problm.
I think I have it better summarised now.

How can I create a function that will take in two variables and return
an integer, when one of the variables is the tablename ?!

I have tried :    create function tst_func(text, varchar(16))    as     'BEGIN        result=select max(history_id)+1
from$1            where client_id = $2;         return result;     END;'    
 
Please excuse the roughness of the code, I am not at my work machine
where I have postgres all setup. 

(oh. and jst a little query, is the 'max' actaully a stored procedureor an SQL keyword ?! I cant seem to find it in any
ofthe documentationprobbly cause I overlooked it ;)
 

Thanks,
Steffs


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

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: two fields in subselect
Следующее
От: Tubagus Nizomi
Дата:
Сообщение: Decimal ??