>SELECT * FROM psCursor INTO CURSOR psCursort > >y = y + 1 > >SCAN > >getPSString = "SELECT pinbr, itdsc, ittyp, cinbr FROM amflib6.pstruc" +; >" Join amflib6.itemasa On amflib6.itemasa.itnbr = amflib6.pstruc.pinbr" +; >" Where pinbr = '" + psCursort.partno + "'" >=SQLEXEC(testconn, getPSString, 'getPSQuery') > >SELECT getPSQuery > >Scan > >INSERT INTO psCursor(itemid, partno, descptn, itemtype, childpn, olinelev, faiid, faistatus) ; >Values(psCursort.itemid, getPSQuery.pinbr, getPSQuery.itdsc, getPSQuery.ittyp, getPSQuery.cinbr, ALLTRIM(STR(y)), "", "") > >EndScan > >EndScan > >It seems you designed endless loop, by scanning the same cursor that you inflate within the loop. By the way, if you want to move data from one cursor to another then use: