Re: create function problem - Mailing list pgsql-sql

From Matteo Beccati
Subject Re: create function problem
Date
Msg-id 2780D698C269CB4EB303715BA48B6A103373@sole.CRP
Whole thread Raw
In response to create function problem  ("Kancha ." <kancha2np@yahoo.com>)
Responses Re: create function problem  ("Kancha ." <kancha2np@yahoo.com>)
List 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 by date:

Previous
From: "Kancha ."
Date:
Subject: create function problem
Next
From: "Kancha ."
Date:
Subject: Re: create function problem