USE Osiris GO DECLARE @txt VARCHAR(1000) DECLARE @txtaux VARCHAR(120) SET @txt = '' SET @txtaux = '' DECLARE cur_text CURSOR FOR SELECT texto FROM Universe.dbo.textOdi WHERE Universe.dbo.textOdi.certif = 'PM115451' OPEN cur_text FETCH NEXT FROM cur_text INTO @txtaux WHILE @@FETCH_STATUS = 0 BEGIN FETCH NEXT FROM cur_text INTO @txtaux SET @txt = @txt + @txtaux END CLOSE cur_text DEALLOCATE cur_text PRINT @txtWhy the @txt local variable doesn't have any accumulated value, if this value this being assigned with the SET commando ?