Skip to Content
0
Former Member
Mar 17, 2009 at 07:48 AM

How to convert Oracle function in UDB

36 Views

Hi ,

i am writing this function in oracle.Could you please convert this function in UDB because i am new in this and dont know how to use decode function in UDB

Please following is the code for oracle.

CREATE OR REPLACE function fun ( localex varchar2,titlex varchar2)

return number

as x number;

begin

select sum ( decode (count (username),max(prereq_count),1,0) ) x into x from

(

SELECT

prereq_count,

username

FROM

table1

)

group by username ;

return x;

end fun;

/

Regards

Vishal