When I do this it it only returns a total of 2 even for the local users.

- charles


On 7/5/05 12:21 PM, "Qasim Rasheed" <[EMAIL PROTECTED]> wrote:

> Have you tried something like this
> 
> 
> SELECT
> COUNT(a.userid) AS Localusers,
> COUNT(a.winadmingroup) AS IsAdmin,
> a.userid
> 
> FROM #Session.Schema#.r_localuserlist a, #Session.Schema#.adminsubnet b
> 
> WHERE   b.oid like '#Session.Username#'
> and a.winadmingroup = 'YES'
> group BY a.userid
> 
> On 7/5/05, Charles Heizer <[EMAIL PROTECTED]> wrote:
>> Hello,
>> I'm trying to do a count and I have never needed to really do this before,
>> so here it goes.
>> 
>> I have a table which contains local user info short name and uid and if it's
>> an admin account.
>> 
>> SELECT
>> COUNT(a.userid) AS Localusers,
>> (COUNT(a.winadmingroup) = 'YES') AS IsAdmin,
>> a.userid
>> 
>> FROM #Session.Schema#.r_localuserlist a, #Session.Schema#.adminsubnet b
>> 
>> WHERE   b.oid like '#Session.Username#'
>> 
>> group BY a.userid
>> 
>> I'm trying to display a count similar to below ...
>> 
>> USERID    LOCALUSERS ADMINS
>> 
>> 10.1.1.3  24         2
>> 
>> 
>> 
>> I hope this makes sense...
>> 
>> Thanks,
>> - Charles
>> 
>> 
>> 
>> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211179
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to