I'm using the SQL Query Analyzer to test a simple query:
SELECT * FROM maintable ORDER BY ntextfield
ntextfield is type ntext. The servers are SQL 2000 developer edition, SQL 2000 Desktop Data Engine and SQL 2000 Enterprise. All three has SP2 installed. Dev. Ed. is installed on Win2000 SP3, DDE is installed on XP, Enterprise is on Win2k SP3 also. Dev. Ed. and DDE throw an error if I try to order by an ntext field. This is also mentioned in the documentation: "Note ntext, text, or image columns cannot be used in an ORDER BY clause."
Enterprise doesn't produce any error and works and orders correctly.
Using the graphic execution plan display of Query Analyzer I see one difference. The two installs that produce the error use Compute Scalar in the process chain:
SELECT -> Compute Scalar -> Sort -> Clustered Index Scan
The install that runs the query fine processes without the Compute Scalar step:
SELECT -> Sort -> Clustered Index Scan
I'd like to know why it works on the Enterprise install? Anybody has seen this? Thanks.
SELECT * FROM maintable ORDER BY ntextfield
ntextfield is type ntext. The servers are SQL 2000 developer edition, SQL 2000 Desktop Data Engine and SQL 2000 Enterprise. All three has SP2 installed. Dev. Ed. is installed on Win2000 SP3, DDE is installed on XP, Enterprise is on Win2k SP3 also. Dev. Ed. and DDE throw an error if I try to order by an ntext field. This is also mentioned in the documentation: "Note ntext, text, or image columns cannot be used in an ORDER BY clause."
Enterprise doesn't produce any error and works and orders correctly.
Using the graphic execution plan display of Query Analyzer I see one difference. The two installs that produce the error use Compute Scalar in the process chain:
SELECT -> Compute Scalar -> Sort -> Clustered Index Scan
The install that runs the query fine processes without the Compute Scalar step:
SELECT -> Sort -> Clustered Index Scan
I'd like to know why it works on the Enterprise install? Anybody has seen this? Thanks.