December 23, 2004 at 9:20 pm
Is it possible to create a partitioned view on a table that has a text field in it (obviously not as a partitioning field)? I tried but I get the following error:
"The text, ntext, or image data type cannot be selected as DISTINCT."
I didn't see anything in the BOL about a restriction on tables with text fields.
December 26, 2004 at 7:20 pm
Yes, it is possible. I have such a partitioned view with a text field in production with no problems.
Assuming that you did not explictly indicate DISTINCT in the sql defining the view, I'm guessing that your view uses UNIONs instead of UNION ALL. UNIONs always imply a implicit distinct because they remove duplicates. Make sure you are using UNION ALL to combine the independent select statements in the view.
If you are already using UNION ALL, could you post the create statement for your view, along with the relevant datatypes for each returned column?
Scott Thornburg
Volt Information Sciences
December 27, 2004 at 3:31 pm
You guessed it, I forgot to make it a UNION ALL.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply