I have Mytable that has two fields.
Each field's name is (field1) and <field2>.
the values of the fields are like followings.
(1) <0>
(2) <0>
(3) <2>
(4) <0>
(5) <0>
(6) <4>
(7) <4>
I like to select (2) and (4).
(2) has same value in <2> of (3).
(4) has same value in <4> of (6) and <4> of (7).
In as to do this,
I use the code below.
select a.field1
from Mytable
a join Mytable b on b.field2 = a.field1
The result outputting of #field1# is "2,4,4" while I expect "2,4".
How can I make the outputting "2,4"(just one time of 4) ?