Forum Discussion
kvhmir
Sep 30, 2024Copper Contributor
Retrieve group members of Active Directory group
All I'm stuck with a stored procedure. The target is very simple: give all members of a given Active Directory unless the account is set to inactive or the member is part of the group "Service Accou...
olafhelper
Oct 01, 2024Bronze Contributor
Incorrect syntax near '+'.
kvhmir , the OpenQuery function allows only fix literals as query parameter, no "calculated" ones => your concat with "+", as in the error message.
See OPENQUERY (Transact-SQL) - SQL Server | Microsoft Learn => parameter "query"