pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matteo Beccati <m.beccati@crpsoftware.it>
To: 'Kancha .' <kancha2np@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: Re: create function problem
Date: Tue, 19 Mar 2002 09:36:28 +0100
Message-ID: <2780D698C269CB4EB303715BA48B6A103373@sole.CRP> (raw)
In-Reply-To: <2780D698C269CB4EB303715BA48B6A10020CC7@sole.CRP>

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/





view thread (8+ messages)  latest in thread

Message-ID: <2780D698C269CB4EB303715BA48B6A103373@sole.CRP>
Permalink:  ../2780D698C269CB4EB303715BA48B6A103373@sole.CRP/
Also on:    postgresql.org/message-id/2780D698C269CB4EB303715BA48B6A103373@sole.CRP

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: m.beccati@crpsoftware.it, kancha2np@yahoo.com
  Subject: Re: create function problem
  In-Reply-To: <2780D698C269CB4EB303715BA48B6A103373@sole.CRP>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox