Hello Luca,

sorry, but I cannot see what will be the common field between your tables. It 
looked as you
wanted to group the values by a common 'value' column, as Elke also deduced. 
However, as this
is not the case we cannot deduce what kind of result you want to produce, and 
which relation
between the data in A and B you want to express or use as qualifier.

Regards
Alexander Schröder

-----Original Message-----
From: Luca Calderano [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 14. September 2006 13:19
To: maxdb@lists.mysql.com
Subject: Re: sql help needed

I cannot use the query you proposed as the tables A and B never have the
same values for the field "Value" 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  |  200
2006-07-25  |  500

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 |   500
  2          |  2006-09-01 |   100         | 2006-09-13 |  200
  3          |  2006-10-01 |   200         |      ?             |   ?


----- Original Message ----- 
From: "Schroeder, Alexander" <[EMAIL PROTECTED]>
To: "Luca Calderano" <[EMAIL PROTECTED]>; <maxdb@lists.mysql.com>
Sent: Thursday, September 14, 2006 11:39 AM
Subject: RE: sql help needed


> Hello Luca,
>
> do you mean something like:
>
> select rowno, a."DATE" AS a_date, a."VALUE", b."DATE" as b_date, b."VALUE"
> from a, b where a."VALUE" = b."VALUE" (+) ORDER BY a_date, b_date
>
> Regards
> Alexander Schröder
> SAP Labs Berlin
>

-- 
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]

Reply via email to