davdam8 (10/24/2012)
ThanksIt gives me an error: Argument data type ntext is invalid for argument 1 of len function
Solutions?
Regards
That would be because you didn't supply DDL or readily consumable sample data, which caused me to assume that you were not using a deprecated type.
You'll have to cast it to NVARCHAR or VARCHAR to use, e.g.
SELECT *
FROM #yourTable
WHERE LEN(CAST(yourData AS NVARCHAR(MAX)))-1 = LEN(REPLACE(CAST(yourData AS NVARCHAR(MAX)) COLLATE Latin1_General_BIN2,'.',''));