Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Can u help to build a Query.....
Hello
i have a table
Let say it has 5 fields say F1,F2,F3,F4,F5
the field 5 i.e F5 shall have value either 0 or 1
Let say it has some records some this like this.....
F1 F2 F3 F4 F5
a b c d 0 (Record 1) a b c d 1 (Record 2) m n o p 0 m n o p 1
I require to have a query which shall check the first field and last
field for comparison
that is
if F1 of Record 1 = F1 of Record 2 and F5 of Record 1 =0 and F5 of
Record 2=1
then should compare rest of the fields i.e F2 F3 F4
such as..
IF F2 of Record 1 <> F2 of Record 2 or F3 of Record 1 <> F3 of Record 2
or F3 of Record 1 <> F3 of Record 2
the query should pass me the whole field i.e F1 F2 F3 F4 F5 In other words fetch only records which has a difference.
I hope i have made the problem clear.
I don't know if this is possible or not, but i shall appreciate if any
one can help me
Thanks and Regards
Kris
Received on Fri Jul 14 2006 - 12:04:27 CDT