.NET 2.0
MS SQL Server 2000
LLBLGen Pro. Version: 1.0.2004.2 Final (June 10th, 2005)
I have this query:
SELECT * FROM QuestionType
INNER JOIN Text ON Text.id = QuestionType.TextId
ORDER BY lid2
That fails because lid2 is ntext.
This on the other hand works fine:
SELECT * FROM QuestionType
INNER JOIN Text ON Text.id = QuestionType.TextId
ORDER BY CAST(lid2 as nvarchar)
So the question is, how do I write the code, so it fits my working query statement?