Querying a table with wildcard charactors

skjoshi

New member
Local time
Today, 11:38
Joined
Jan 17, 2013
Messages
3
I have a data base,one of the field contain Data like "ZZZ-DEFS#UUH1234567".
There should always be 19 characters in this field including #.I want to design a query which can sort out entries less than and more than 19 characters, so that wrong entries can be corrected .

Any Help please

skjoshi
 
Have you tried something like below :
Code:
SELECT 
	Table1.Field1, 
	Len([Field1]) AS TheLength
FROM 
	Table1
WHERE 
	(((Len([Field1]))<>19));
Thanks
 
Thanks, but I don't know where to put this code, can you please elaborate.

skjoshi
 
Above is a query, which you can design in the query builder design grid.
"Table1" is your table
and
Field1 is the field in your table which contains the data.
The field "TheLength" gets the length of the data in Field1
and
the where clause filters out data that do not have a length of 19.

In case, above is not what you are looking for, let us know.

Thanks
 

Users who are viewing this thread

Back
Top Bottom