× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi

I'm trying to get a Java DB2 UDF to work on V5R3 connecting to SQL Server 
2000.
I've got everything to work except for one column (BuyerRating) that is 
defined as Decimal (3,2).
When I go into STRSQL on the iSeries and run a statement the function 
keeps failing with SQLSTATE 42724 .
If I remove the BuyerRating column from my UDF, it works fine.

On the iSeries I define the table as such:

CREATE FUNCTION BI.Buyer(parmWhere VARCHAR(512)) 
RETURNS TABLE (SourceID                      Int, 
               BuyerNumber                   Char(5), 
               BuyerName                     Char(25), 
               DepartmentNumber              Char(4), 
               NumberOfOrdersLate            Dec(5,0), 
               NumberOfOrdersEarly           Dec(5,0), 
               NumberOfOverShipments         Dec(5,0), 
               NumberOfUnderShipments        Dec(5,0), 
               DateThisRecordLastMaintained  Date, 
               BuyerRating                   Dec(3,2), 
               BuyerUserId                   CHAR(10), 
               IfmUserId                     CHAR(10), 
               Source                        CHAR(20)) 
EXTERNAL NAME 'PurchaseStarBuyer.buyer' 
LANGUAGE Java 
PARAMETER STYLE DB2General 
FENCED 
NO SQL 
DISALLOW PARALLEL 
SCRATCHPAD 
FINAL CALL 
RETURNS NULL ON NULL INPUT 


The SQL Server table is defined as: 

SourceID                        10      0       int
BuyerNumber                     5       0       char
BuyerName                       25      0       char
DepartmentNumber                4       0       char
NumberOfOrdersLate              5       0       decimal
NumberOfOrdersEarly             5       0       decimal
NumberOfOverShipments   5       0       decimal
NumberOfUnderShipments  5       0       decimal
DateThisRecordLastMaintained    23      3       datetime
BuyerRating                     3       2       decimal
BuyerUserId                     10      0       char
IfmUserId                       10      0       char
Source                          20      0       char


Anyone have any ideas how I can fix this problem so the BuyerRating column 
would not cause this issue?
ALL other columns work, it's just when I add the BuyerRating column with 2 
decimal positions that it stops working.

Thank You
Ron

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.