Jul 21, 2004 #1 Cap2010 Programmer Joined Mar 29, 2000 Messages 196 Location CA Hi, Is there a command "diff" in Oracle 8/8i sql. Where can i find further details. Cap
Jul 21, 2004 #2 alexhu MIS Joined Sep 25, 2001 Messages 1,288 Location GB Not as far as I know There is one in UNIX though Alex Upvote 0 Downvote
Jul 21, 2004 #3 carp MIS Joined Sep 16, 1999 Messages 2,622 Location US What is it that you are trying to "diff"? Upvote 0 Downvote
Jul 21, 2004 Thread starter #4 Cap2010 Programmer Joined Mar 29, 2000 Messages 196 Location CA I am trying to find difference from 1 row with next row in the same table Cap2010 Upvote 0 Downvote
Jul 21, 2004 #5 sem Programmer Joined Jun 3, 2000 Messages 4,709 Location UA Use minus sql operator: Code: select <field1, .., fieldN> from <table> where <condition1> minus select <field1, .., fieldN> from <table> where <condition2> Regards, Dima http://seminihin.narod.ru Upvote 0 Downvote
Use minus sql operator: Code: select <field1, .., fieldN> from <table> where <condition1> minus select <field1, .., fieldN> from <table> where <condition2> Regards, Dima http://seminihin.narod.ru
Jul 22, 2004 #6 nagornyi MIS Joined Nov 19, 2003 Messages 882 Location US Code: selecr a.field - b.field from (select field, rownum num from table) a , (select field, rownum num from table) b where a.num = b.num-1 Upvote 0 Downvote
Code: selecr a.field - b.field from (select field, rownum num from table) a , (select field, rownum num from table) b where a.num = b.num-1