Re: Can't get UDF to work
Date: Sun, 10 Feb 2002 16:54:56 +0100
Message-ID: <EQw98.7708$B43.355964_at_news000.worldonline.dk>
eeeh - what about
select count(att.task_uid), count(ug.start_date)
into ttl_tasks, u_tasks
"Brian" <bmasterson_at_mindbuilder.com> wrote in message
news:96ccb2aa.0202100610.1f097ac5_at_posting.google.com...
> I'm trying to get the following udf to work but I get an error on
> "into u_tasks" on the second line of the query. Does anyone know how I
> can get around this error. I've tried a bunch of different ways to
> accomplish this result and it seems like this would be the cleanest
> approach ... if I could get it to work.
>
> function getPercentDone( u_uid in number, c_uid in number ) return
> number is
> the_percent number(10);
> ttl_tasks number(10);
> u_tasks number(10);
> begin
> select count(att.task_uid) into ttl_tasks,
> count(ug.start_date) into u_tasks
> from all_tasks att, user_grade ug
> where att.class_uid = c_uid
> and att.task_uid = ug.task_uid(+)
> and ug.user_uid(+) = u_uid;
>
> the_percent := (u_tasks/ttl_tasks) * 100;
> return ( the_percent );
> end getPercentDone;
>
> Thanks for your help!
> Brian
Received on Sun Feb 10 2002 - 16:54:56 CET