richard
25th November 2005, 10:48
Hello, we changed from 6.1c.06.07 to 6.1c.07.08 PS.

A specific refers to doesn't no more work:

Select ...
from tfacr200,tfacr002
where .... and tfacr200.prob refers to tfacr002 unref clearunref
and tfacr002.srem <> tcyesno.no
Only the acr200 records with prob <> "" are selected !

There were 2 selects generated and now one.
Do you know about BaaN session of that kind (we are only on SP6 and tools SP16 IVc4).

Regards

SUN PS 06.07:
SQL> SELECT /*+ FIRST_ROWS INDEX(a ttfacr200100$idx7) */
a.t$balh,a.t$bala,a.t$rate,a.t$ratf,a.t$ccur,a.t$dued,a.t$cuno,a.t$ttyp,a.t
$ninv,a.t$line,a.t$tdoc,a.t$docn,a.t$lino,a.t$bahc,a.t$prob FROM
baan.ttfacr200100 a WHERE a.t$cuno = :1 AND a.t$tdoc = :2 AND a.t$d
ued >= :3 AND a.t$dued <= :4 ORDER BY 7,11,6,8,9,10,12,13
SQL> SELECT /*+ FIRST_ROWS index(b ttfacr002100$idx1) */ b.t$prob,b.t$srem
FROM baan.ttfacr002100 b WHERE b.t$prob = :1

HP: PS 6.1C.07.08

SQL> SELECT /*+FIRST_ROWS INDEX_ASC(a ttfacr200100$idx7)*/
a.t$balh,a.t$bala,a.t$rate,a.t$ratf,a.t$ccur,a.t$dued,a.t$cuno,a.t$ttyp,a
.t$ninv,a.t$line,a.t$tdoc,a.t$docn,a.t$lino,a.t$bahc,b.t$srem,a.t$prob FROM
baan.ttfacr200100 a,baan.ttfacr002100 b WHERE b.t$prob (
+) = a.t$prob AND b.t$srem <> :1 AND a.t$cuno = :2 AND a.t$tdoc = :3 AND
a.t$dued >= :4 AND a.t$dued <= :5 ORDER BY 7,11,6,8,9,10,12
,13

Nandan
25th November 2005, 11:18
Looks like driver is not generating query which is correct in syntax for oracle outer join. It is required to place out join operator (+) for all the fields of the out join table. Looks like baan missed one (+) operator. The correct query should have been.

SQL> SELECT /*+FIRST_ROWS INDEX_ASC(a ttfacr200100$idx7)*/
a.t$balh,a.t$bala,a.t$rate,a.t$ratf,a.t$ccur,a.t$dued,a.t$cuno,a.t$ttyp,a
.t$ninv,a.t$line,a.t$tdoc,a.t$docn,a.t$lino,a.t$bahc,b.t$srem,a.t$prob FROM
baan.ttfacr200100 a,baan.ttfacr002100 b WHERE b.t$prob (
+) = a.t$prob AND b.t$srem(+) <> :1 AND a.t$cuno = :2 AND a.t$tdoc = :3 AND
a.t$dued >= :4 AND a.t$dued <= :5 ORDER BY 7,11,6,8,9,10,12
,13

(Please note the bold characters)

If this a customization you have done, then consider using new outer join syntax introduce by baan in the latest porting sets. You may find the information on this by searching on this forum, i guess.