Skip to Content
avatar image
Former Member

How to Limit Rows in ADO query from Active Directory

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 06, 2017 at 05:22 PM

    I am not sure the LIMIT 900 is correct syntax,

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2017 at 07:49 PM

    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'

    Add comment
    10|10000 characters needed characters exceeded