Hello guys, I am trying to load a csv to memory in Powershell and query it using an OLEDB driver, and have done this successfully in the past however for this specific query I am getting a syntax error. My query is as follows:
A similar styled query in another script I regularly use works in this format as $removeList is a single string variable as seen in the error below, however the other script uses WHERE [sAMAccountName] IN ( $otherList ) rather than NOT IN.
Error:
Would anyone know what operator is missing or if the query is valid as I was under the impression NOT IN is valid in Access SQL?
Thanks in advance,
Chris
SELECT * from csv WHERE [sAMAccountName] NOT IN( $removeList )
A similar styled query in another script I regularly use works in this format as $removeList is a single string variable as seen in the error below, however the other script uses WHERE [sAMAccountName] IN ( $otherList ) rather than NOT IN.
Error:
Syntax error (missing operator) in query expression '[sAMAccountName] NOT IN( 'user1', 'user2', 'user3', 'user4' ...'
Would anyone know what operator is missing or if the query is valid as I was under the impression NOT IN is valid in Access SQL?
Thanks in advance,
Chris