October 7, 2014 at 8:49 am
I have 2 tables. Based on the Table1 id which is a column in Table2, I would like the following
Table1
T1_Id
1
2
3
4
Table2
T2_IDT1_ID Color
1 3 red
2 3 blue
3 1 green
4 1 orange
Result
Just the records 3 and 1 from table1
Thanks for the help
October 7, 2014 at 8:59 am
sturner-926343 (10/7/2014)
I have 2 tables. Based on the Table1 id which is a column in Table2, I would like the followingTable1
T1_Id
1
2
3
4
Table2
T2_IDT1_ID Color
1 3 red
2 3 blue
3 1 green
4 1 orange
Result
Just the records 3 and 1 from table1
What have you tried? Looks like an inner join on t1.T1_id = Table2.T1_ID
October 7, 2014 at 9:01 am
sturner-926343 (10/7/2014)
I have 2 tables. Based on the Table1 id which is a column in Table2, I would like the followingTable1
T1_Id
1
2
3
4
Table2
T2_IDT1_ID Color
1 3 red
2 3 blue
3 1 green
4 1 orange
Result
Just the records 3 and 1 from table1
Thanks for the help
It's tough to understand exactly what you are after.
Based on what you have written, I would say this (and I am quite sure that this is not your desired solution):
select * from table1 where t1_id in (1,3)
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply