× 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.



ERIC/ROB: No data is converted or summed (etc).  Below is the SQL view I use
and the SQL statement does nothing extra except for WHRER, ORDER BY, FOR
FETCH ONLY and OPTIMIZE FOR 15 ROWS. 

The biggest coincidence is if the result set returns 16 or more UPC and at
least one of the UPCS vendors has at least 16 and that set of 16 appears in
the result set first and multiple stores are selected with the IN condition,
I see this error.

This data is our vendor items by store.  One record for each store carrying
that vendor item.

CREATE VIEW RIMVISQV AS SELECT IM.*, VI.*, SR.* 
FROM RIMDTA.RIMITMPF IM 
 INNER JOIN RIMDTA.RIMVITPF VI ON IMUPC=VIUPC 
 INNER JOIN RIMDTA.RIMVSIPF SR ON SRVND=VIVND AND SRUPC=VIUPC AND
VIWHON=SRWHON AND VIWHONALT=SRWHONALT AND VIDPT=SRDPT AND VICAT=SRCAT   AND
VISUB=SRSUB     

See the example screen shot. 


Thank you,
Matt Tyler
WinCo Foods, Inc
mattt@xxxxxxxxxxxxxx


-----Original Message-----
From: DeLong, Eric [mailto:EDeLong@xxxxxxxxxxxxxxx] 
Sent: Friday, November 12, 2004 2:29 p
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Embedded SQL does not work all the time with a page-at-a-time
SFL

Matt,

Do you use aggregate functions and "group by" to generate summary data?  I
had issues with memory corruption, where SQL sized the aggregate values too
large to fit in the field defined on the fetch.  No hard errors were
reported, but the results were clearly in error on *some* transactions.  

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



                        Vendor:                         +       ** All Vendors 
**                               Whse#:                  +       or      Alt #: 
                 +                        
                        UPC:          28400-02843       +       F/L LAYS REG  
P299                      Dept:           +       ** All Departments **         
              
                Store/Group:     1099   +       ALL STORES                      
                        Cat/Sub:                /               +       ** All 
Categories **                  
        Position to:                                                    Sort 
by:        U       +       UPC     In super comps:                         
prices in effect on:    11/12/2004              +
        2=Upd   3=Cpy   4=Del/Un-Del    8=Price Lkup    9=Related       F=Force 
New     L=Lnkd          P=Price         M=Mast          R=Rvw   C=Cst   A=Adjs  
        D=Dep/tx        N=Notes 
Opt     St             UPC              S/C        Description           Size   
         Pack    Vendor         Unit cost       Price   P/T     STS      GM%    
TGM%    A           Master UPC          N
         07          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         10          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.00   41       1       4.5-  
15.0    Y         999-00001-26377        
         12          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.00   41       1       4.5-  
15.0    Y         999-00001-26377        
         17          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.00   41       1       4.5-  
15.0    Y         999-00001-26377        
         21          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            1.4900        1.78  250       1      16.3   
15.0    Y         999-00001-26377        
         24          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         25          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            1.4900        1.98  250       1      24.7   
15.0    Y         999-00001-26377        
         26          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            1.4900        1.67  215       1      10.8   
15.0    Y         999-00001-26377        
         31          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         36          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         37          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         52          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         53          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         55          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
         56          -28400-02843       B       F/L LAYS REG  P299      12Z     
            1      31618            2.0900        2.46    1       1      15.0   
15.0    Y         999-00001-26377        
                                                                                
                                                     More...  

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.