![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to select data from 2 separate tables, when one column is LIKE a column in the other table. For example, I have tableA and tableB. col2 in tableA has a row with '"Jason"', and col2 in tableB has 'Jason' (without the double quotes), but I still want them to match. This is what I thought would work, but doesn't (I just get a syntax error): SELECT tableA.col1, tableB.col1 FROM tableA, tableB WHERE tableA.col2 LIKE "%". tableB.col2 ."%" Is there a correct way to use a wildcard here? |
#3
| |||
| |||
|
|
I'm trying to select data from 2 separate tables, when one column is LIKE a column in the other table. For example, I have tableA and tableB. col2 in tableA has a row with '"Jason"', and col2 in tableB has 'Jason' (without the double quotes), but I still want them to match. This is what I thought would work, but doesn't (I just get a syntax error): SELECT tableA.col1, tableB.col1 FROM tableA, tableB WHERE tableA.col2 LIKE "%". tableB.col2 ."%" Is there a correct way to use a wildcard here? |
![]() |
| Thread Tools | |
| Display Modes | |
| |