• The syntax error is within some dynamic SQL and hence only caught when the dynamic SQL is executed. You'll need to add a PRINT statement to print the dynamic SQL to the client so that you can see exactly what is trying to be executed and failing.

    Since you're not enclosing any of the index or table names in [], probably there's an index or table somewhere that has ( in its name.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass