Hello,
Hopefully I can explain this without typing too much or getting confused myself. What I need/want is a select statement that returns two columns, one of which has the IDs based on one set of criteria and the other is IDs based on another set of criteria. So for example, I want to use Table1 and get ExampleID where OtherID = 1 and OtherID = 2.
So I want my result set to look like:
I tried using a cross join and that was quite close to what I wanted only the whole cartesian idea got in the way (since there were 3 in each, I got a result set of 9 with incorrect mappings).
Thanks for the help...
Hopefully I can explain this without typing too much or getting confused myself. What I need/want is a select statement that returns two columns, one of which has the IDs based on one set of criteria and the other is IDs based on another set of criteria. So for example, I want to use Table1 and get ExampleID where OtherID = 1 and OtherID = 2.
Code:
Table1
-------
ExampleID OtherID
25 1
26 1
27 1
30 2
31 2
32 2
So I want my result set to look like:
Code:
ExampleID Expr1
25 30
26 31
27 32
I tried using a cross join and that was quite close to what I wanted only the whole cartesian idea got in the way (since there were 3 in each, I got a result set of 9 with incorrect mappings).
Thanks for the help...