• Hello

    I am currently working on a system where Dynamic SQL is used extensively (including dynamic table names, and cursors :(( ). It's a nightmare to work with and debug - to make things worse SQL doesn't usually cache dynamic queries - so they are incredibly inefficient (one procedure i'm working on takes 26 min to run and got trimmed down to 2 min by making it static as possible)

    To debug use PRINT() statements (specially on @@ROWCOUNT) in your code since they are ignored by applications, but can be seen in Enterprise manager when debugging.

    Robin