Hi,
Often repeated errors where '@' variable is not declared for a reference in a WHERE clause in a SP generated by DDL script from custom tool for MS SQL Server.
The generated SP comtains variable assignments using the '@' symbol, but if another '@' variable is referenced in the WHERE clause, it throws an error (even if that variable is declared in another part of the script - being local). BRN..
Section with error in sql file (as text)