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]

Reply via email to