Re: create function problem

Поиск
Список
Период
Сортировка
От Matteo Beccati
Тема Re: create function problem
Дата
Msg-id 2780D698C269CB4EB303715BA48B6A103373@sole.CRP
обсуждение исходный текст
Ответ на create function problem  ("Kancha ." <kancha2np@yahoo.com>)
Ответы Re: create function problem  ("Kancha ." <kancha2np@yahoo.com>)
Список pgsql-sql
Hi,

> create function usage(text)
> returns numeric
> as 'select ceil(sum(sessiontime)/60) from ath_online
> where loginname=\'$1\' and  startdate >= (select
> startdate from cst_package where status=\'t\' and
> cid=(select cid from cst_customer where
> loginname=\'$1\'));'
> language 'sql';

Try to replace \'$1\' with just $1 (i.e. loginname = $1).

Regards
--
Matteo Beccati
C.R.P. Software S.r.l.
http://www.crpsoftware.it/




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

Предыдущее
От: "Kancha ."
Дата:
Сообщение: create function problem
Следующее
От: "Kancha ."
Дата:
Сообщение: Re: create function problem