We have a product that we were experiencing high recompile rates do to
temp tables, we have re-written them to use table variables to reduce
recompile rate. The problem I am having is that we have some
customers still on SQL 7 where the table variables were not valid. I
would like to have one installation script that would create the
stored procedure with table variables on SQL Server 2000 and without
on SQL Server 7, I have been unsuccessful do to the limitation that
CREATE PROCEDURE statement cannot be in a script with any other
statements.
Was wondering if anyone else has run into this and found a way around
it.
temp tables, we have re-written them to use table variables to reduce
recompile rate. The problem I am having is that we have some
customers still on SQL 7 where the table variables were not valid. I
would like to have one installation script that would create the
stored procedure with table variables on SQL Server 2000 and without
on SQL Server 7, I have been unsuccessful do to the limitation that
CREATE PROCEDURE statement cannot be in a script with any other
statements.
Was wondering if anyone else has run into this and found a way around
it.
Comment