Does anyone actually test this code or is most of this stuff just rumors?
According to most of the information I should be able to create multiple variables...
DECLARE @SELECT varchar(100)
DECLARE @FROM varchar(100)
DECLARE @DynamicSQL1 varchar(8000)
DECLARE @DynamicSQL2 varchar(8000)
DECLARE @DynamicSQL3 varchar(8000)
SET @SELECT = 'SELECT '
SET @FROM = 'FROM DATA_SOURCE'
EXEC (@SELECT + @DynamicSQL1 + @DynamicSQL2 + @DynamicSQL3 + @FROM)
The exec statement only accesses the first 8000 characters and then shuts down.
What am I missing/