View Single Post
  #1 (permalink)  
Old 03-17-2006, 03:55 AM
no.mail.pls
 
Posts: n/a
Default Retrieve fields with similar values from 2 tables?

Hi,

How do i retreive fields with similar values from 2 tables?

I tried to use
"SELECT * FROM $table1 as o , $table2 as p WHERE o.name like '%p.name%'";
but it doesn't retrieve similar names from the 2 tables.

However,
"SELECT * FROM $table1 as o , $table2 as p WHERE o.name like p.name";
will retrieve only names that match exactly, but this is not what i want.

Any advice will be appreciated.

TIA




Reply With Quote