* added function to prevent problems with fully-qualified table names in query (Thanks to Johan Vromans for his help).