I'm using SQL Server, and I have a table that - for the sake of example - looks something like this:
This is one table, two columns. If possible, what sort of query can I use to get a single return value from col1, where col2 has 2 or more particular values? For instance, supposing I have the values of 5 and 6 for col2, I'd expect this query to return 2, because 2 is the value in col1 for both col2=5 and col2=6.Code:col1 col2 1 5 1 3 2 5 2 6 2 7
Does that make sense?...


Reply With Quote
This query is being used as a sub-query, and the overall query is still not producing the desired result, but I think this part is correct now. I'll post again about the rest of the query if I can't figure it out myself.
Thanks again!
