MS SQL Exception: Incorrect syntax near ‘@P0’

SQL Server requires you to place parenthesis around the argument to top if you pass in a variable:

SELECT TOP (?)

Leave a Comment