Question about SELECT statement
I have one table in this format:
Product Component
---------------------------
A part1
A part2
B part1
B part4
A part3
C part5
D part1
now I want to display product which components meet requested items, for example:
I know component are "part1" and "part3", need to show product name (that is "A").
How can I do that in SQL statement?
Thanks.
michael123
Junior Poster in Training
94 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
How about "part1", "part3" are retrieved from SELECT statement? to use "select from table where component in (select part1 from....)"?
Also "IN(part1, part3)" is OR , not AND, right? I need "AND".
michael123
Junior Poster in Training
94 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
cgyrob's response was what you asked for. What is your real goal here? Or are we not understanding your problem correctly?
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735