How about
select a.name from table1 a, table2 b where a.name like
concat("%",b.name,"%");
You might want to read chapter 6.3 in the mysql manual:
http://www.mysql.com/doc/en/Functions.html
HTH,
Jed
On the threshold of genius, Jorge Martinez wrote:
> yes, but select a.name from table1 a, table2 b where a.name like
> '%'b.name'%';
>
> is an error
>
>
> ----- Original Message -----
> From: Mary Stickney <[EMAIL PROTECTED]>
> To: Jorge Martinez <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, August 29, 2002 1:26 PM
> Subject: RE: like problem
>
>
>>
>> that would be because b.name is inside the ' ' and it is taken as a
>> constant.
>>
>>
>> -----Original Message-----
>> From: Jorge Martinez [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, August 29, 2002 11:10 AM
>> To: [EMAIL PROTECTED]
>> Subject: like problem
>>
>>
>> i need this consult
>>
>> select a.name from table1 a, table2 b where a.name like '%b.name%';
>>
>> but i have a problem because Mysql not recognize the value of b.name
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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