Link to home
Start Free TrialLog in
Avatar of bendecko
bendecko

asked on

Getting LEN of field type ntext

Hi,

SELECT propertyID FROM properties WHERE LEN(propertyDescription) > 200

gives me the result

Server: Msg 8116, Level 16, State 2, Line 1
Argument data type ntext is invalid for argument 1 of len function.

So maybe I can't len ntext fields?

Any one know of a work around?

Ben
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

use datalength() function:

SELECT propertyID
FROM properties
WHERE DATALENGTH(propertyDescription) > 200

CHeers
ASKER CERTIFIED SOLUTION
Avatar of Rimvis
Rimvis
Flag of Lithuania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bendecko
bendecko

ASKER

Great!

angelIII I think I'm going to split the point on this one between you two as if Rimvis hadn't suggested his comment I'd have been sratching my head for ages!!!!

No problem I hope?

Give all the points to Rimvis, his answer was complete!
CHeers
That very noble of you angelIII I'll sort you out next time.

Ben