anirudhadeo
Programmer
HI All,
I got to have some query Which I think Is some what complicated can some one please help me out..??
I have got one table say A(id1 integer,id2 integer,val char);
Id1 and id2 columns are not unique.
what I want is to have one query that will give me
1.The rows for which the id1 and id2 combination is unique.
i.e. the rows for which id1 and id2 can be a composite key in the resultset.
2. This is bit complicated for me to explain .
I want to get all the rows with the above condition as in 1.
As Well as I want that if there is any condition
where values of id1 and id2 are 1 and 2 respectively for one row and for another they are 2 and 1 respectively then
such rows should not b selected........( the vice versa combination should also be unique)
Is it possible to have a query for 1. and 2.
please suggest.
Anirudha
I got to have some query Which I think Is some what complicated can some one please help me out..??
I have got one table say A(id1 integer,id2 integer,val char);
Id1 and id2 columns are not unique.
what I want is to have one query that will give me
1.The rows for which the id1 and id2 combination is unique.
i.e. the rows for which id1 and id2 can be a composite key in the resultset.
2. This is bit complicated for me to explain .
I want to get all the rows with the above condition as in 1.
As Well as I want that if there is any condition
where values of id1 and id2 are 1 and 2 respectively for one row and for another they are 2 and 1 respectively then
such rows should not b selected........( the vice versa combination should also be unique)
Is it possible to have a query for 1. and 2.
please suggest.
Anirudha