set @tempTable = 'SELECT sum(' + @tempTable + ') '
set @tempTable = @tempTable + 'FROM #ReturnStada '
set @tempTable = @tempTable + 'WHERE RoomType<>''Allotments left'''
set @tempTable = @tempTable + ' AND RoomType<>''Free rooms'''
execute sp_executesql @tempTable
can anybody help me to get the value of this select sum into this variable @Tempallvalue
doesnt work
set @Tempallvalue = execute sp_executesql @tempTable
Best regards Hlynur
set @tempTable = @tempTable + 'FROM #ReturnStada '
set @tempTable = @tempTable + 'WHERE RoomType<>''Allotments left'''
set @tempTable = @tempTable + ' AND RoomType<>''Free rooms'''
execute sp_executesql @tempTable
can anybody help me to get the value of this select sum into this variable @Tempallvalue
doesnt work
set @Tempallvalue = execute sp_executesql @tempTable
Best regards Hlynur