> I'm trying to write an MS Access query like this:
>
> SELECT Table1.Title
> FROM Table1, Table2
> WHERE Table1.Title = Table2.Title
>
> The problem is that the Title fields' values may not be
> exactly equal. 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)"
>
> I thought of using the LIKE operator, but it appears that
> LIKE only works when comparing a field and a string, not two
> fields. If I'm wrong, please tell me the syntax.
>
> Any other suggestions on how to do this query?
In Access, you can use the InStr function for this:
SELECT Table1.Title
FROM Table1,
Table2
WHERE InStr(Table2.Title, Table1.Title)
However, this may indicate a poorly designed data schema, since you should
generally have a shared key when doing a join.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists