Home Forums SQL Server 2005 T-SQL (SS2K5) In store procedure where i need to declare "Declare @SQL1 varchar(800)" to access within Begin statement RE: In store procedure where i need to declare "Declare @SQL1 varchar(800)" to access within Begin statement

  • Take this lot out from just before the exec. The GO breaks the batch and afterwards, the SQL1... variables are not defined.

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    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