The table has loaded. I isolated the problem. At first I had to add the "ug" prefix to all the group_name references. However, the code always broke at "order by upper(group_name)". I removed that line, and it works fine. I know i probably need it, but if it works now, i guess i'll probably just have to wait and see what suprises it gives me!