Unanswered: The text, ntext, or image data type cannot be selected as DISTINCT?
In the following query (where 'PageText' is an NTEXT column in both the NotebookPages and the NotebookPageTemplates table), each Select can be individually executed, but combining them with a UNION apparently triggers the error: The text, ntext, or image data type cannot be selected as DISTINCT. Has anyone run into this? (These columns must be NTEXT because of the size of the data they must store).
Thanks in advance.
SELECT 'N' as TypeFlag, NotebookName, PageNumber, 'N/A' as UserID, 'N/A' as TemplateName, Version, PageText
SELECT 'T' as TypeFlag, 'N/A' as NotebookName, 0 as PageNumber, UserID, TemplateName, 1, PageText
ORDER BY TypeFlag, NotebookName, PageNumber, UserID, TemplateName;