View Full Version : Query String???


gmatriix
05-19-2008, 05:27 AM
Hello All,

I am having a problem with comparing to list in a query... I have two list...however one of the list does not have the last letter in the string...for example:

BA12459A - one list

BA12459 - second list

I wanted it to match it even if it does not have the last letter..

please help...its Monday!

Thanks

doco
05-19-2008, 05:55 AM
Are the items in the lists of consistent length? From whence do the list items come? Which way is the comparison being made ( List1 == List2 OR List2 == List1 )?

Look at some of the string functions in Help Left(), Right(), etc. If those list come from a table look at the LIKE '*' statement in SQL help.

neileg
05-19-2008, 06:42 AM
If it is always the last character you need to remove then use this formula in a query to remove it:
Left([MyFieldName],Len([MyFieldName])-1)

gmatriix
05-19-2008, 07:09 AM
thanks alot