Hi,
I would need some help with a query. I'm trying to select the records from Table_1 which exists in Table_2.
So based on the data below (example) the records returned by the query would be:
DATA:
Obviously, with this query I don't get the expected results.
Thanks in advance.
I would need some help with a query. I'm trying to select the records from Table_1 which exists in Table_2.
So based on the data below (example) the records returned by the query would be:
Code:
ID|VALUE|NAME
133|T2|Type 2
141|T3|Type 3
175|T4|Type 4
DATA:
Code:
[i]TABLE_1[/i]
ID|VALUE|NAME
132|T1|Type 1
133|T2|Type 2
141|T3|Type 3
175|T4|Type 4
Code:
[i]TABLE_2[/i]
ID|NAME|TYPE_VALUE
8993|Best Buy|T2
9110|Price Chopper|T3
9330|Costco|T4
9666|Radio Shack|T2
9712|Wal-Mart|T4
Obviously, with this query I don't get the expected results.
Code:
SELECT TABLE_1.*, TABLE_2.*
FROM TABLE_1, TABLE_2
WHERE TABLE_1.VALUE = TABLE_2.TYPE_VALUE
Thanks in advance.