Hello Armin,
I had a similar problem some time ago with ADABAS D11.0.
But without an error message. It result in a very long running query
(20 min. for 20 results). I've found a solution in changing the query
like this: select a.id
from foo a, foo b, foo c, foo d
where a.id = b.id
and a.id = c.id
and a.id = d.id
and a.pos = 1
and b.pos = 2
and c.pos = 3
and d.pos = 4
and (
a.txt = 'foo'
or b.txt = 'bar'
or c.txt = 'baz'
or d.txt = 'biz'
);
Try it.
A different solution might be to do some quries in tmp tables.
Regards
Lutz
On Thu, 14 Feb 2002 12:04:56 +0100
Armin Haaf <[EMAIL PROTECTED]> wrote:
> Hello!
>
> we are evaluation sapdb for a project and found a problem with self
> joins.
>
> A example:
>
> create table foo (
> id smallint,
> pos smallint,
> txt varchar(2048)
> );
>
>
> Both selects didn't work:
>
> select a.id
> from foo a, foo b, foo c, foo d
> where a.id = b.id
> and b.id = c.id
> and c.id = d.id
> and a.pos = 1
> and b.pos = 2
> and c.pos = 3
> and d.pos = 4
> and (
> a.txt = 'foo'
> or b.txt = 'bar'
> or c.txt = 'baz'
> or d.txt = 'biz'
> );
>
>
>
> select a.id
> from foo a, foo b, foo c, foo d
> where a.id = b.id
> and b.id = c.id
> and c.id = d.id
> and (
> (a.pos = 1 and a.txt = 'foo')
> or (b.pos = 2 and b.txt = 'bar')
> or (c.pos = 3 and c.txt = 'baz')
> or (d.pos = 4 and d.txt = 'biz')
> )
> ;
>
>
> Result of this selects are
>
> "DBTech SQL: [-2000] (at 8343) Row too long"
>
>
>
> It seems sapdb creates a result table with the columns of each from
> table concatenated. Is this normal behaviour? If this is normal
> behaviour, is it possible to do "large" self joins on a table with
> sapdb?
>
>
> Greetings
>
> Armin
>
> --
> Armin Haaf, mercatis information systems GmbH
> Marlene-Dietrich-Str. 5 Fon +49 (0) 731 98588 - 615 ___o
> 89231 Neu-Ulm, Germany Fax +49 (0) 731 98588 - 511 _\ <_
> http://www.mercatis.de mailto:[EMAIL PROTECTED] (_)�(_)
>
>
> _______________________________________________
> sapdb.general mailing list
> [EMAIL PROTECTED]
> http://listserv.sap.com/mailman/listinfo/sapdb.general
--
Lutz Steinborn mailto:[EMAIL PROTECTED]
4c AG Tel +49 6092 999592
Stefan-George-Ring 22-24 Fax +49 89 99341 399
81929 M�nchen http://www.4c-shopping.de
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general