Re: Get number of records, but not the record contents?
From: Lee Derbyshire (a_at_t)
Date: 03/16/05
- Next message: Andreas: "Help"
- Previous message: Georges: "Problems reseting password using MMC"
- In reply to: Jerold Schulman: "Re: Get number of records, but not the record contents?"
- Next in thread: Joe Richards [MVP]: "Re: Get number of records, but not the record contents?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 16 Mar 2005 09:51:02 -0000
Thanks, I'll try it.
"Jerold Schulman" <Jerry@jsiinc.com> wrote in message
news:pg5e319d9n6gf7cv1pqrjjaq5p80askt5a@4ax.com...
> On Tue, 15 Mar 2005 15:57:04 -0000, "Lee Derbyshire" <email a@t
> leederbyshire d.0.t c.0.m> wrote:
>
>>
>>Hi All,
>>
>>Is there a way of finding out the number of records that ~would~ have
>>been returned by a query, but without actually returning all the
>>actual records?
>>
>>Thanks,
>>
>>Lee.
>>
>
> You could use dsquery, tip 6820, 7714, & 7992 in the 'Tips & Tricks' at
> http://www.jsiinc.com
> to write a script.
>
> If you wanted the number of users in Georgia with a surname that starts
> with "S"
>
> @echo off
> setlocal ENABLEDELAYEDEXPANSION
> set qry=dsquery * domainroot -filter
> "(&(objectCategory=Person)(objectClass=User)(sn=s*))" -attr st -limit 0
> set /a cnt=0
> for /f "Tokens=*" %%a in ('%qry%^|FIND /I "GA"') do (
> set /a cnt=!cnt! +1
> )
> @echo The number of users in Georgia with a surname that starts with "S"
> are: %cnt%
> endlocal
>
>
> Jerold Schulman
> Windows Server MVP
> JSI, Inc.
> http://www.jsiinc.com
- Next message: Andreas: "Help"
- Previous message: Georges: "Problems reseting password using MMC"
- In reply to: Jerold Schulman: "Re: Get number of records, but not the record contents?"
- Next in thread: Joe Richards [MVP]: "Re: Get number of records, but not the record contents?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|