you can use exec, since you're not passing parameters in or out of the dynamic SQL
CREATE procedure Search
(
@SearchKeyword Varchar(2000),
@Productid varchar(2000),
@Type varchar(200),
@SQLPerms varchar(5000)
)
as
Declare @SQL varchar(7000)
set @SQL=' This Statement length goes more than 4000.'
exec (@SQL)
GO
Make sure you're checking for SQL injection attempts.
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