Connor Only O(n) if the management of 4G * 32bit PL/SQL associative arrays is really linear. I suspect it wouldn't quite be at these volumes - 128GB of memory required excluding overheads just for this one structure :-)) PS Michael's connect by test table has just two problems - (1) it arrives sorted and (2) there are no missing numbers... Regards Nigel -- //www.freelists.org/webpage/oracle-l