So I have created a temporary table using the code shown below, and the table correctly displays all the information I want to see-CREATE TABLE #Test (part_number text,point_name text,position_tol float)INSERT INTO #Test (part_number, point_name, position_tol)SELECT tpf.part_number, fpl.point_name, tpf.position_tolerance FROM true_position_features tpfINNER JOIN feature_point_list fplON tpf.part_number = fpl.part_number AND tpf.feature_name = fpl.feature_name
Unfortunately, however, all I can seem to do with this table is SELECT * FROM #Test
or select individual columns; what I have been trying to do is use something like SELECT COUNT(DISTINCT point_name) FROM #Test
but I keep receiving the error "Operand data type text is invalid for count operator."I have used COUNT with text columns before, so I don't what is going on. Anyone have an idea?