Better syntax:
Use NULL vs. a literal such as 1 or 'x' as in:
SELECT NULL FROM ...
Sample code using EXISTS that checks for the proper installation of the full-text filters for various document types:
-- Ensure that the IFilter interfaces (filters) are enabled for ALL of the document types supported by the product.
-- Abort if they are not.
IF NOT EXISTS
(
SELECT NULL
WHERE EXISTS (SELECT NULL FROM sys.fulltext_document_types WHERE document_type = N'.doc')
AND EXISTS (SELECT NULL FROM sys.fulltext_document_types WHERE document_type = N'.ppt')
AND EXISTS (SELECT NULL FROM sys.fulltext_document_types WHERE document_type = N'.pdf')
)
BEGIN;
RAISERROR('The required IFilters are not enabled or installed - aborting', 16, 1);
END;
GO