Skip to Content
0

How to Limit Rows in ADO query from Active Directory

Jan 06, 2017 at 05:21 PM

80

avatar image

How do i Limit the number of rows displayed with a SQL Command or Syntax statement? I have tried LIMIT but that does not work.

SELECT CN, OperatingSystem

FROM 'LDAP://DC=domain,DC=edu' WHERE objectClass='computer'

LIMIT 900

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Vitaly Izmaylov
Jan 06, 2017 at 05:22 PM
0

I am not sure the LIMIT 900 is correct syntax,

I would try "SELECT TOP 100 CN, ..."

Share
10 |10000 characters needed characters left characters exceeded
Chris L Jan 06, 2017 at 07:49 PM
0

that syntax does not work for me.

SELECT CN, OperatingSystem SELECT TOP 100 CN FROM 'LDAP://OU=EUC_Devices,OU=CHMC,OU=SCAL,OU=Regional_Sites,DC=domain,DC=edu' WHERE objectClass='computer'

OR

SELECT TOP 100 CN, OperatingSystem FROM 'LDAP://OU=EUC_Devices,OU=CHMC,OU=SCAL,OU=Regional_Sites,DC=domain,DC=edu' WHERE objectClass='computer'


Share
10 |10000 characters needed characters left characters exceeded