0

Hi geeks,

I really need your help. I want to query in a table in MS SQL using a data in another table.
This might give you an idea on what I am talking about. This is the query I've constructed : "SELECT TABLE1.FIELD1,TABLE1.FIELD2 FROM TABLE1, TABLE2
WHERE TABLE1.FIELD3 = (SELECT TABLE2.FIELD3 FROM TABLE2
WHERE TABLE2.FIELD4 BETWEEN 'A1' AND 'A50')".

Please guys reply...I experimented a lot but still unsuccessful.

Thanks in advance...

WHchaz1027

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by jbisono
0

Try a Inner Join like this.

SELECT TABLE1.FIELD1, TABLE1.FIELD2
FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.FIELD3 = TABLE2.FIELD3
WHERE TABLE2.FIELD4 BETWEEN 'A1' AND 'A50'
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.