Unanswered: OpenQuery, Active Directory, single quote problem
This is not your standard single quote to double quote problem (i think )...
The issue occurs when I am trying to query Active Directory using openquery and the group I am using to filter against has a single quote in the name...
from openquery(ADSI, 'SELECT *
NOTE: "ADSI" is our Active Directory Services 2.5 linked server
Syntactically, if I remove the single quote from "O'Brien", the query runs successfully, just no results are returned, which validates the syntax of the overall statement. The single quote though is preventing me from being able to run this specific query. I have tried to escape the single quote with a forward slash, backward slash, etc. I just haven't been able to figure out how to do that correctly. Any help is appreciated.