Subject | Re: [IBO] Re: TIB_SearchPanel and searching problem and another... |
---|---|
Author | Jason Wharton |
Post date | 2001-05-18T18:24:16Z |
IBO should work either way.
I'm not seeing what your problem is. Is it because I am using the AliasName
instead of the SQLName (meaning the actual name of the column instead of the
alias name you gave it).
I wish InterBase would accept that alias name because this would make it
work even if you were using self joins.
Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
I'm not seeing what your problem is. Is it because I am using the AliasName
instead of the SQLName (meaning the actual name of the column instead of the
alias name you gave it).
I wish InterBase would accept that alias name because this would make it
work even if you were using self joins.
Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Yagi" <yagi@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, May 17, 2001 1:43 PM
Subject: [IBO] Re: TIB_SearchPanel and searching problem and another...
> Andreas,
>
> Thanks for your answer.
> I tried this query and it worked perfectly.
> I check the performance of both query (by Marathon) and it seems that
query
> with inner/outer joins is faster (for big number of record it can be
> significant).
>
> With FieldXXX there is also no problem with my query if there is an alias
> for each NUMER fields.
>
> What is strange for me is the way of IB_SearchPanel works.
>
> For your query, if I search for n3=6 for example the genereted query is:
>
> SELECT
> (select NUMER from STANOWISKA st where st.ID = s.ID_STANOWISKA) as nr1,
> (select NUMER from KLIENCI k where k.ID = s.ID_KLIENTA) as nr2,
> (select NUMER from KARNETY k where k.ID = s.ID_KARNETU) as nr3
> FROM SESJE s
> WHERE (select NUMER from KARNETY k where k.ID = s.ID_KARNETU) = 6
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> and it is OK
>
> but (as i said earlier) for my query
>
> SELECT STANOWISKA.NUMER, KARNETY.NUMER, KLIENCI.NUMER
> FROM SESJE
> INNER JOIN STANOWISKA
> ON(STANOWISKA.ID = SESJE.ID_STANOWISKA)
> LEFT OUTER JOIN KLIENCI
> ON(KLIENCI.ID = SESJE.ID_KLIENTA)
> LEFT OUTER JOIN KARNETY
> ON(KARNETY.ID = SESJE.ID_KARNETU)
>
> and KARNETY.NUMER=6 typed in IB_SearchPanel
>
> the generated query is
>
> SELECT STANOWISKA.NUMER, KARNETY.NUMER, KLIENCI.NUMER
> FROM SESJE
> INNER JOIN STANOWISKA
> ON(STANOWISKA.ID = SESJE.ID_STANOWISKA)
> LEFT OUTER JOIN KLIENCI
> ON(KLIENCI.ID = SESJE.ID_KLIENTA)
> LEFT OUTER JOIN KARNETY
> ON(KARNETY.ID = SESJE.ID_KARNETU)
> WHERE STANOWISKA.NUMER = 6
>
> what else, for query with filed aliases
>
> SELECT STANOWISKA.NUMER NR1, KARNETY.NUMER NR2, KLIENCI.NUMER NR3
> FROM SESJE
> INNER JOIN STANOWISKA
> ON(STANOWISKA.ID = SESJE.ID_STANOWISKA)
> LEFT OUTER JOIN KLIENCI
> ON(KLIENCI.ID = SESJE.ID_KLIENTA)
> LEFT OUTER JOIN KARNETY
> ON(KARNETY.ID = SESJE.ID_KARNETU)
>
> generated query is
> SELECT STANOWISKA.NUMER NR1, KARNETY.NUMER NR2, KLIENCI.NUMER NR3
> FROM SESJE
> INNER JOIN STANOWISKA
> ON(STANOWISKA.ID = SESJE.ID_STANOWISKA)
> LEFT OUTER JOIN KLIENCI
> ON(KLIENCI.ID = SESJE.ID_KLIENTA)
> LEFT OUTER JOIN KARNETY
> ON(KARNETY.ID = SESJE.ID_KARNETU)
> WHERE KARNETY.NR2 = 6
>
> Is this the right way IB_SearchPanel works?
>
> As I remember in TTable there is an Orgin property for its fields to solve
> field name problem.
>
> Please help me.
>
> Yagi
>
> ----- Original Message -----
> From: Andreas Pohl <apohl@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Thursday, May 17, 2001 3:41 PM
> Subject: Re: [IBO] TIB_SearchPanel and searching problem and another...
>
>
> > Yagi,
> >
> > try following query:
> >
> > SELECT
> > (select NUMER from STANOWISKA st where st.ID = s.ID_STANOWISKA) as nr1,
> > (select NUMER from KLIENCI k where k.ID = s.ID_KLIENTA) as nr2,
> > (select (NUMER from KARNETY k where k.ID = s.ID_KARNETU) as nr3
> > FROM SESJE s
> >
> > Thes inner joins are perfectly supported and there is no problem at all
to
> > work with FieldsXXX properties.
> >
> > Mit freundlichem Gruss & Best Regards
> >
> > Andreas Pohl
> > apohl@...
> > www.ibp-consult.com
> > ----- Original Message -----
> > From: "Yagi" <yagi@...>
> > To: "IBObjects" <IBObjects@yahoogroups.com>
> > Sent: Thursday, May 17, 2001 3:11 PM
> > Subject: [IBO] TIB_SearchPanel and searching problem and another...
> >
> >
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>