Subject Re: [IBO] please help with multi query lookup on same table.
Author Andreas Hesse
send2iwan schrieb:
> hi,
>
> i am using Ibo 4.8.7 with delphi 2007.
>
> have problem with this query below:
> SELECT
> A.CUSTID
> , B.NAME
> , C.NAME
> , D.NAME
> FROM CUSTOMER A
> LEFT OUTER JOIN MARKETING B
> ON A.IMP=B.MKTG
> LEFT OUTER JOIN MARKETING C
> ON A.EXP=C.MKTG
> LEFT OUTER JOIN MARKETING D
> ON A.OUT=D.MKTG
>
> Result in field properties always like this
> A.CUSTID
> B.NAME
> B.NAME
> B.NAME
>
> why not
> A.CUSTID
> B.NAME
> C.NAME
> D.NAME
>
> how to fix this?
>
> thanks all.
>
>
>
>

Better use a query where all the field names are different like

SELECT
A.CUSTID
, B.NAME as NameB
, C.NAME as NameC
, D.NAME as NameD
FROM CUSTOMER A
LEFT OUTER JOIN MARKETING B
ON A.IMP=B.MKTG
LEFT OUTER JOIN MARKETING C
ON A.EXP=C.MKTG
LEFT OUTER JOIN MARKETING D
ON A.OUT=D.MKTG


- which query component are you using
- what is the full field name

--
Andreas