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/