Syntax error in SQL statement at or about "WITH (NOLOCK)" with parametrized db query reader

hi all, my database has record locks, and I have to pass a “WITH (NOLOCK)” statement at the end of my query. When I enter that into a parameterized db query reader I get a syntax error. Is there anyway I can have the parameterized db query reader pass my SQL as-is without trying to validate it?

My workaround is to use a loop and pass my SQL into a flow variable, then run the db query reader. Then I have to join the data back to itself because the db query reader doesn’t have the option to “retain all columns”

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.