Everybody,
Using the code below, I get the followin error:
Server: Msg 170, Level 15, State 1, Line 16
Line 16: Incorrect syntax near '@retTable'.
Using the code below, I get the followin error:
Server: Msg 170, Level 15, State 1, Line 16
Line 16: Incorrect syntax near '@retTable'.
Code:
DECLARE @TextLine1 VarChar(20),
@IntCounter Int,
@Pointer VarBinary(16)
DECLARE @retTable TABLE
( SelectDetailSubClause Text )
INSERT INTO @retTable (SelectDetailSubClause)
VALUES (NULL)
SET @TextLine1 = 'Line to be inserted.'
SET @IntCounter = 0
WHILE @IntCounter <= 10
BEGIN
SELECT @Pointer = TEXTPTR(RT.SelectDetailSubClause) FROM @retTable RT
UPDATETEXT @retTable.SelectDetailSubClause @Pointer NULL NULL @TextLine1
SET @IntCounter = @IntCounter + 1
END
-- END WHILE
SELECT RT.SelectDetailSubClause FROM @retTable RT