Thanks for the code for the sql. Pretty helpful. I really have to organize such large databases.