Subject | Re: [IBO] filter on TIB_QUERY generates wrong SQL |
---|---|
Author | Wolfgang Rohdewald |
Post date | 2006-12-29T17:45:14Z |
On Friday 29 December 2006 18:08, Wolfgang Rohdewald wrote:
... as above
from ma join kun on ma.kunde=kun.kunde
where 1=1
order by kun.filialeorzentrale,kun.zentrale nulls first;
generated SQL is
from ma join kun on ma.kunde=kun.kunde
where 1=1
AND (MA = '206128004184')
ORDER BY kun.filialeorzentrale ASC
, kun.zentrale ASC NULLS FIRST
;
--
Wolfgang
> selectthis one generates correct SQL:
> kun.zentrale as zentrale, kun.filialeorzentrale, kun.sprache as sprache, kun.kurzname as filkurzname
> , MA
> , RL
> , MA.KUNDE as KUNDE
> , EBELEG
> from ma join kun on ma.kunde=kun.kunde
> order by kun.filialeorzentrale,kun.zentrale nulls first;
>
>
> the generated SQL is
>
> select
> kun.zentrale as zentrale, kun.filialeorzentrale, kun.sprache as sprache, kun.kurzname as filkurzname
> , MA
> , RL
> , MA.KUNDE as KUNDE
> , EBELEG
> from ma join kun on ma.kunde=kun.kunde
> ORDER BY kun.filialeorzentrale ASC
> , kun.zentrale WHERE (MA = '206128004002') ASC NULLS FIRST
> ;
... as above
from ma join kun on ma.kunde=kun.kunde
where 1=1
order by kun.filialeorzentrale,kun.zentrale nulls first;
generated SQL is
from ma join kun on ma.kunde=kun.kunde
where 1=1
AND (MA = '206128004184')
ORDER BY kun.filialeorzentrale ASC
, kun.zentrale ASC NULLS FIRST
;
--
Wolfgang