Qry to find strings with len=10 and no same letter twice ...

Steff_DK

Registered User.
Local time
Today, 22:30
Joined
Feb 12, 2005
Messages
110
I have a two tables with about 44.000 words that I need to search.

I need to find words that are exactly 10 characters AND where each letter is only represented once ...

Anyone that has an idea how to write that query?

Any help would be highly appreciated.
Thanks from cold Denmark,

Steff
 
Steff,

Here's an idea -

First off write a query that selects all the records equal to 10.

This query to be called Query1

Then right a second query with an expression as follows
Expr1: Len([Query1!Field])-Len(Replace([Query1!Field],"a",""))

This counts the number of times "a" appears in the field selected by Query1.

Repeat for every letter of the alphabet to Z in the same second query with new expression for each letter of the alphabet.

Now a third query on the second query that only selects those records which do not have a value of 2 or greater in any of the expressed letter counts..

Not pretty but reckon it might work..!!!
Probably a more elegant solution
 

Users who are viewing this thread

Back
Top Bottom