Subject | Re: [IBO] please help with multi query lookup on same table. |
---|---|
Author | send2iwan |
Post date | 2009-07-12T01:28:04Z |
firebird 2.1.2
if i use alias like this
SELECT
A.CUSTID
, B.NAME ONE
, C.NAME TWO
, D.NAME THREE
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
became
A.CUSTID
B.ONE
B.TWO
B.THREE
if i use alias like this
SELECT
A.CUSTID
, B.NAME ONE
, C.NAME TWO
, D.NAME THREE
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
became
A.CUSTID
B.ONE
B.TWO
B.THREE
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...> wrote:
>
> What version of Firebird/InterBase are you using?
> This behavior is different depending on which database and version.
>
> Thanks,
> Jason
>
> ----- Original Message -----
> From: "send2iwan" <send2us@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Thursday, July 09, 2009 2:25 AM
> Subject: [IBO] please help with multi query lookup on same table.
>
>
> > 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.
>