> >
> > A basic description is that If Column A in Table 1 is Equal to
> Column A in
> > table 2 then it returns the data from Column B in Table 2.
> > However, Column A
> > in Table 1 may contain a list of words that need to be matched
> > not just one
> > single entry.
> >
> > If someone could point me in the right direction for some code or
> > a solution
> > I would be very appreciative.
> >
>
> select Table2.ColumnB
> from Table1, Table2
> WHERE Table1.ColumnA = Table2.ColumnA
>

And just in case I misunderstood the intent:
If 'Column A in Table 1' has space-delimited words in each record such as:
abc def ghi
I believe you could use a combination of CONCAT and REPLACE.  The WHERE
clause would look something like:

WHERE Table2.ColumnA IN (CONCAT('"',REPLACE(Table1.ColumnA,' ','","'),'"'))

I haven't tested this at all and it may fail miserably, but it's where I
would start.

Jay Fesco

Magical Mystery Words: database,sql,query,table



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to