user776676
user776676

Reputation: 4385

Microsoft Access: How to sort text column by length of its text string?

I have a column that contains text in my Access database.

Is there a way to sort this column by the length of the strings in it (without having to write lots of code)? Showing longest strings first, for example.

Thanks.

Upvotes: 3

Views: 4594

Answers (1)

Christian Specht
Christian Specht

Reputation: 36451

SELECT StringColumn, len(StringColumn) AS Length
FROM YourTable
ORDER BY len(StringColumn) DESC

Upvotes: 5

Related Questions