matching strings except last character

ianking

Registered User.
Local time
Today, 12:11
Joined
Mar 15, 2008
Messages
29
Hi,

I need to create a query using two tables which matches the first twelve characters in a string, but ignores the last one.

eg 9781904024415 in field1 of table1 matches 9781904024419 in field1 of table2
 
Left([yourtextfield],12)

or alternately:

Left(Str([yourtextfield]),12)
in the event that it's a number, you will need to convert to string first
 
just to add, you'll have to use a subquery as well to return the records you wish from either table of matching quality.
 
Perhaps if your Brian, you could do it by brain waves. =)
 
thanks

Left([yourtextfield],12)

or alternately:

Left(Str([yourtextfield]),12)
in the event that it's a number, you will need to convert to string first


Worked a treat (with subquery) - many thanks!
 

Users who are viewing this thread

Back
Top Bottom