pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kancha . <kancha2np@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: create function problem
Date: Tue, 19 Mar 2002 00:25:33 -0800 (PST)
Message-ID: <20020319082533.35506.qmail@web14909.mail.yahoo.com> (raw)

I've used the following sql to create the function and
function creation is also successful.

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';

executing this function as 
select usage('kancha');

returns no records. while executing the query directly
replacke $1 with kancha returns result. Where did i go
wrong ??

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/



view thread (8+ messages)  latest in thread

Message-ID: <20020319082533.35506.qmail@web14909.mail.yahoo.com>
Permalink:  ../20020319082533.35506.qmail@web14909.mail.yahoo.com/
Also on:    postgresql.org/message-id/20020319082533.35506.qmail@web14909.mail.yahoo.com

 · 

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: kancha2np@yahoo.com
  Subject: Re: create function problem
  In-Reply-To: <20020319082533.35506.qmail@web14909.mail.yahoo.com>

* 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