The result table should be ordered by "A.Date" and "B.Date" that is:
Table A (the table is unordered by Date) ----------- Date | Value 2006-09-01 | 100 2006-10-01 | 200 2006-07-01 | 50 Table B (the table is unordered by Date) ----------- Date | Value 2006-09-13 | 100 2006-07-25 | 50 RESULT (the result table is ordered by the field "A.Date" and by the field "B.Date") -------------- PROGR | A.Date | A.VALUE | B.Date | B.Value 1 | 2006-07-01 | 50 | 2006-07-25 | 50 2 | 2006-09-01 | 100 | 2006-09-13 | 100 3 | 2006-10-01 | 200 | ? | ? thanks ----- Original Message ----- From: "Zabach, Elke" <[EMAIL PROTECTED]> To: "Luca Calderano" <[EMAIL PROTECTED]>; <maxdb@lists.mysql.com> Sent: Wednesday, September 13, 2006 6:14 PM Subject: RE: sql help needed > Luca Calderano wrote: > > > > I have the two tables below: > > > > Table A > > ----------- > > Date | Value > > 2006-09-01 | 100 > > 2006-10-01 | 200 > > 2006-07-01 | 50 > > > > Table B > > ----------- > > Date | Value > > 2006-09-13 | 100 > > 2006-07-25 | 50 > > > > I need to do a dbproc showing the following result: > > > > RESULT > > -------------- > > PROGR | A.Date | A.VALUE | B.Date | B.Value > > 1 | 2006-07-01 | 50 | 2006-07-25 | 50 > > 2 | 2006-09-01 | 100 | 2006-09-13 | 100 > > 3 | 2006-10-01 | 200 | ? | ? > > > > HOW do i manage to obtain this result ?? > > Hi, > > are we talking about the following? > > select rowno, a."DATE", a."VALUE", b."DATE", b."VALUE" > from a, b > where a."VALUE" = b."VALUE" (+) > > or the more-standard syntax > select rowno, a."DATE", a."VALUE", b."DATE", b."VALUE" > from a left outer join on a."VALUE" = b."VALUE" > > no dbproc should be needed. > > Or do you need the sorting concerning a.value? > Then things would be a little bit more difficult > > Elke > SAP Labs Berlin > > > > > Thanks in advance > > Luca > > > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]