|
The following function in Sql Server 2000 returns more than 01 value in the shape of table. but the RETURNS TABLE CLAUSE not working in DB2 Function, is it or similar supported in DB2 ? CREATE FUNCTION function2 (principal decimal(12,2),rate decimal(5,2),startyear int,endyear int) RETURNS Depreciation TABLE( DEP_YEAR INT NOT NULL, Begin_WDV DECIMAL(12,2) NOT NULL, Rate DECIMAL(6,3) NOT NULL, Dep_Amount DECIMAL(12,2) NOT NULL, End_WDV DECIMAL(12,2) NOT NULL) LANGUAGE SQL BEGIN DECLARE variable1 DECIMAL(5,2); Insert into Depreciation Select * from myTable; RETURN END; Best Regards, Luqman
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.