Details
Description
- Table: foo (id:integer, title:text)
- Created Query: SELECT [id], [title] FROM [foo] ORDER BY [title]
Throws:
Server: Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Solution:
- Created Query: SELECT [id], [title] FROM [foo] ORDER BY CAST([title] AS VARCHAR(8000))
References:
- http://msdn.microsoft.com/en-us/library/aa276838(v=SQL.80).aspx
- http://msdn.microsoft.com/en-us/library/cc645611.aspx
Patch will be supplied soon ...
http://github.com/estahn/doctrine1/compare/DC-828
http://github.com/estahn/doctrine1/tree/DC-828
I guess we need more TestCases for the SubQuery stuff.