[thelist] Re: MS Access query
David Shadovitz
david_shadovitz at xontech.com
Thu Nov 16 19:14:34 CST 2000
Rudy & all,
Thanks, but there is no set min length.
I found a solution: use the InStr function:
SELECT Table1.Title
FROM Table1, Table2
WHERE InStr(1,Table2.Title,Table1.Title,1) > 0
Syntax: InStr([start, ]string1, string2[, compare])
Returns the position of the 1st occurrence of one string within another
> Table2.Title may have additional text in parentheses
> at the end. For example:
>
> Table1.Title = "The cow jumped over the moon"
> Table2.Title = "The cow jumped over the moon (really)"
hi david
if the two strings really are the same at the front, all you have to do
is
determine the minimum length you want them to be equal, then use the
microsoft access Left$ function
SELECT Table1.Title
FROM Table1, Table2
WHERE Left$(Table1.Title,21) = Left$(Table2.Title,21)
adjust 21 to the minimum length you want
rudy
r937.com
More information about the thelist
mailing list