cast in ORDER BY?

Posts   
 
    
Jackk100
User
Posts: 48
Joined: 11-Jan-2005
# Posted on: 18-May-2005 00:02:37   

Hi,

Is there a way to do something like this in LLBLGen? The ItemText field in the db is an ntext datatype (and I can't change it):

ORDER BY cast(i.ItemText as varchar(1000))

TIA, Jack

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 18-May-2005 09:55:55   

No that's not possible at the moment.

One way to solve this is by adding a computed column to the table which has as value the cast, then sort on the computed column.

Frans Bouma | Lead developer LLBLGen Pro