-- Find all objects with unclassified spectra.   
-- A simple SELECT-FROM-WHERE query, using a function
--
-- On DR2, returns 3109 rows in 20 sec.

SELECT specObjID
FROM   SpecObj
WHERE  SpecClass = dbo.fSpecClass('UNKNOWN')