> >sql = "Select recseq, partno, dwgrev, dwgtitle," +; >" faistatus, engno, failocn, datstmpi From webprddt7.drawmfai" +; >" Left Join amflib7.itemasa On amflib7.itemasa.itnbr = webprddt7.drawmfai.partno" +; >" Where " + luField + luString + " Order By partno, datstmpi DESC" > >If db2 does not allow ORDER BY LEFT(PartNo,6) then include this as a computed field in the field list and use new name in the order by.