M@x, как вариант:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<!--<script src="http://code.jquery.com/jquery-latest.min.js"></script>-->
</head>
<body>
<table name="table">
<tr>
<td>1</td>
<td class="tempdat-1">test</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-2">test</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-3">test1</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-4">test1</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-5">test2</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-6">test1</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-7">test</td>
</tr>
<tr>
<td>1</td>
<td class="tempdat-8">test2</td>
</tr>
<!-- строк очень много-->
</table>
<script>
var tdElemsList = [].slice.call( document.querySelectorAll("[class^='tempdat-']") ),
tmpArr = [];
tdElemsList.forEach(function(item) {
(tmpArr.indexOf(item.textContent) == '-1') ? tmpArr.push(item.textContent) : item.parentNode.style.display = 'none';
});
alert(tmpArr);
</script>
</body>
</html>