Matteo Gattoni wrote: > HI, > I'm still trying to fetch datas in a recursive function. Waiting for > your responses to my latest email (that follows), I've tried changing the > structure of my algorithm. > Now I use a function that is called in an update statement like: > > UPDATE PSF.ACTIVITY_RELATIONSHIP set C_TREE_PATH = > FIX_TREE_D(E_ACT_K_ACTIVITY1, E_ACT_K_ACTIVITY2, '') > WHERE E_ACT_K_ACTIVITY1 = 7 AND E_ACT_K_ACTIVITY2 = 8 > > The function is declared as follow: > > DROP FUNCTION FIX_TREE_D > // > CREATE FUNCTION FIX_TREE_D( father fixed, child fixed, prefix CHAR) > RETURNS VARCHAR > AS > VAR C_TREE_PATH_D VARCHAR(1000); Appo fixed(9,0); treeN VARCHAR(1000); > BEGIN > IF prefix = '' OR prefix is null THEN > set C_TREE_PATH_D = '/' || father || '/' || child || '/' > ELSE > set C_TREE_PATH_D = prefix || child || '/'; > /* Mi occupo dei figli */ > UPDATE PSF.ACTIVITY_RELATIONSHIP > set C_TREE_PATH = FIX_TREE_D(:Appo, E_ACT_K_ACTIVITY2, ltrim(rtrim > (:C_TREE_PATH_D))) > WHERE E_ACT_K_ACTIVITY1 = :Appo; > RETURN C_TREE_PATH_D; > END; > // > > At compiling time, I receive the following error: General error;-915 > POS(375) No more memory:CAT_CACHE_SUPPLY.
This is a bug. As a workaround please change the return type of the function from VARCHAR to CHAR(1000). For you this actually does not change anything, since inside the function you return VARCHAR(1000). Best Regards, Thomas -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
