SQL Query Assistance

Michael Whisenant ( mwhisen@airnet.net )
Sat, 28 Feb 1998 23:21:50 -0600

I am looking to get a simple report that I can generate out of Emerald that
list off the following information. Login, PhoneHome, PhoneWork,
FirstName, LastName, Region. I might want to extract other information
from MasterAccounts also.

I can easily generate the listing of all the information contained inside
the SubAccount table. I am aware of getting added information from the
other tables, but fail miserably. Here is the script that gets everything
I need except the Region from MasterAccounts.

SELECT Login, PhoneHome, PhoneWork, FirstName, LastName
FROM SubAccounts
Where login > ""
GROUP BY Login, PhoneHome, PhoneWork, FirstName, LastName
ORDER BY Login
GO

I have tried... this does not work...

SELECT SubAccounts.Login, SubAccounts.PhoneHome, SubAccounts.PhoneWork,
SubAccounts.FirstName, SubAccounts.LastName, MasterAccounts.Region
FROM SubAccounts, MasterAccounts
Where login > ""
GROUP BY SubAccounts.Login, SubAccounts.PhoneHome, SubAccounts.PhoneWork,
SubAccounts.FirstName, SubAccounts.LastName, MasterAccounts.Region
ORDER BY SubAccounts.Login
GO

This takes forever and timesout. What I am wanting to accomplish is
finding out how many users I have in a region, has a listing of all login
accounts, and other sorts of queries. What I have thought is export to
text the information I need to load into say an Excel file that I can train
any person to get me the information I need. Any thoughts?