tighted up the script by simplifying the query and how I access the data with for loops and feed the info to my db table. investment company table only.