Re: create function problem

From: "Matteo Beccati" <m(dot)beccati(at)crpsoftware(dot)it>
To: "'Kancha (dot)'" <kancha2np(at)yahoo(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: create function problem
Date: 2002-03-19 08:36:28
Message-ID: 2780D698C269CB4EB303715BA48B6A103373@sole.CRP
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kancha . 2002-03-19 10:03:43 Re: create function problem
Previous Message Kancha . 2002-03-19 08:25:33 create function problem