No, the database is Oracle. I just tried what you suggested and it works
great!

Thanks!


On 7/5/05 1:09 PM, "Jochem van Dieten" <[EMAIL PROTECTED]> wrote:

> Charles Heizer wrote:
>> 
>> 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   replace(a.userid,'_','~') like replace(b.subnet,'_','~')  and
>>         b.oid like '#Session.Username#'
>> 
>> group BY a.userid
> 
> SELECT
>    a.userid,
>    COUNT(a.userid) AS Localusers,
>    SUM(CASE WHEN a.winadmingroup = 'YES' THEN 1 ELSE 0 END) AS
> IsAdmin
> FROM
>    #Session.Schema#.r_localuserlist a,
>    #Session.Schema#.adminsubnet b
> WHERE
>    replace(a.userid,'_','~') like replace(b.subnet,'_','~')
>    and
>    b.oid like '#Session.Username#'
> GROUP BY
>    a.userid
> 
> 
> Am I reading this right to be a PostgreSQL database? In that
> case, you might want to use a CIDR datatype for b.subnet, that
> should reduce the JOIN condition to a.userid << b.subnet
> http://www.postgresql.org/docs/8.0/interactive/functions-net.html
> 
> Jochem
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:211193
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to