Re: SQL Query Assistance

Laslo Orto ( laslo@cpol.com )
Sun, 01 Mar 1998 00:40:49 -0500

At 11:21 PM 2/28/98 -0600, you wrote:
>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 > ""

AND SubAccounts.CustomerID=MasterAccounts.CustomerID

> 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?
>
>
>
> ----------------------------------------------------------
> Emerald Mailing List listserver@emerald.iea.com
>