Subject Re: [IBO] IB_Query phenomenom
Author Jason Wharton
Use JoinLinks and never put join criteria directly in the WHERE clause.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <guido.klapperich@...>
To: <ibobjects@egroups.com>
Sent: Tuesday, January 02, 2001 12:23 PM
Subject: [IBO] IB_Query phenomenom


> I have a IB_Query with the following SQL-Statement:
> select
> FD.FDID,FD.FDDCID,FD.FDDFID,FD.FDBONUS,
> A.FMID,A.FMFDID,A.FMMPID,(select MPNAME from MAINPRODUCTGROUPS where
> MPID=A.FMMPID) as MPNAME,A.FMDISCOUNT,A.FMDISCOUNTNEW
> ,
> B.FMID,B.FMFDID,B.FMMPID,(select MPNAME from MAINPRODUCTGROUPS where
> MPID=B.FMMPID) as MPNAME,B.FMDISCOUNT,B.FMDISCOUNTNEW
> ,
> C.FMID,C.FMFDID,C.FMMPID,(select MPNAME from MAINPRODUCTGROUPS where
> MPID=C.FMMPID) as MPNAME,C.FMDISCOUNT,C.FMDISCOUNTNEW
> from
> FOLLOWUPDISCOUNTS FD,
> FOLLOWUPDISCOUNTS_MP A
> ,
> FOLLOWUPDISCOUNTS_MP B
> ,
> FOLLOWUPDISCOUNTS_MP C
> where
> A.FMFDID=FD.FDID
> and A.FMMPID=11
> and
> B.FMFDID=FD.FDID
> and B.FMMPID=12
> and
> C.FMFDID=FD.FDID
> and C.FMMPID=13
>
> When I open the query, I have the phenomenom, that only the selected row
> has the right values. This means, when I select the first row, it shows
> the correct values and all other rows show the same, but wrong values.
> Now I select for example the third row, now this row has the correct
> values and all other show wrong values.
> When I execute the SQL-Statement with a IB_Cursor, all is fine, only
> IB_Query has this strange behaviour. Can anybody tell me, where the
> problem is ?
>
> Guido.
>
>
>
>