This question is better on DB2 list To join go to I DUG.ORG
Lizette -----Original Message----- >From: Ron Thomas <[email protected]> >Sent: Jun 13, 2014 10:50 AM >To: [email protected] >Subject: SQL Query > >Hello. > >Here is the query we used in one of the online programs, looks like the >performance is not good. any alternate way to handle this ? > >SELECT ENDOR_NBR, > ENDOR_DPT_NBR, > ENDOR_SQ_NBR, > P2TEM_NBR > FROM ITEM > WHERE VENDOR_NBR >= 898900 > AND VENDOR_DEPT_NBR >= 10 > AND VENDOR_SEQ_NBR >= 1 > AND ITEM_NBR > 0 > ORDER BY ENDOR_NBR, > ENDOR_DPT_NBR, > ENDOR_SQ_NBR, > P2TEM_NBR ASC >FETCH FIRST 1 ROW ONLY > >Thanks >Ron T > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
