Re: Can't get UDF to work

From: Brian <bmasterson_at_mindbuilder.com>
Date: 10 Feb 2002 13:40:36 -0800
Message-ID: <96ccb2aa.0202101340.78f59b08_at_posting.google.com>


Keld-

Many thanks! That worked perfectly. Don't know why I didn't think of it.

Brian

"Keld Nielsen" <keldnielsen_at_image.dk> wrote in message news:<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 - 22:40:36 CET

Original text of this message