Re: Ackermann function (was factorial)
From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Mon, 07 Jan 2002 19:07:05 -0500
Message-ID: <3C3A3829.DFEF6F85_at_ca.ibm.com>
Date: Mon, 07 Jan 2002 19:07:05 -0500
Message-ID: <3C3A3829.DFEF6F85_at_ca.ibm.com>
Hi,
It's been a while since I knew the vocabulary.
But I think for pure SQL that is correct.
Now in SQL/PSM you can always do it with recursive calls (and every recursion can be turned
iterative I dimly remember).
DB2 UWO's SQL UDFs don't support recursive calls today. But that's our bad, not SQL/PSM's ;-)
You could use a "dynamic compound statement" and use a table as stack. You've got 64K to code it :-)
Cheers
Serge
-- Serge Rielau DB2 UDB SQL Compiler Development IBM Software Lab, CanadaReceived on Tue Jan 08 2002 - 01:07:05 CET