Subject FW: [IBO] Filter
Author Jason Wharton
-----Original Message-----
From: Jason L. Wharton [mailto:jwharton@...]
Sent: Wednesday, September 26, 2007 12:53 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Filter


Preface the Filter with ::SQL:: and then it won't process it. It will just
pass it through as raw SQL to be appended to your WHERE clause.

Jason


> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of tgtecchio
> Sent: Wednesday, September 19, 2007 5:08 AM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Filter
>
> Hi Helen, thanks for your reply!
>
> My sql statement is just like this:
>
> SELECT XX.ID, XX.STATE, XX.CUSTOMER_NAME
> FROM CUSTOMER_TABLE XX
> WHERE XX.STATE = 'CA'
>
> After this, I apply the filter. I put the parenthesis as
> you told me, but IBO parsed a wrong sql statement.
>
> My filter: (UPPER(XX.CUSTOMER_NAME) LIKE 'HELEN%')
>
> So, when I apply the filter, I got this sql:
>
> SELECT XX.ID, XX.STATE, XX.CUSTOMER_NAME
> FROM CUSTOMER_TABLE XX
> WHERE XX.STATE = 'CA'
> AND (UPPER(XX.CUSTOMER_NAME) AND LIKE 'HELEN%')
>
> What is wrong because there's an extra "and" in the middle.
> I think the whole problem is located at
> TIB_Dataset.ProcessSQLWhereStrings,
> but who knows?
>
>
>
>
> --- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
> >
> > At 03:16 AM 19/09/2007, you wrote:
> > >Hi!
> > >
> > > Do someone know what's wrong with this filter expression?
> > >
> > > UPPER(CLIENT_NAME) LIKE 'JOHN%'
> > >
> > > IBO raises an error everytime asking for parenthesis... Very
> strange.
> > >
> > > My configuration: D7 + F1.5 + IBO4.8.7
> >
> > Missing from your posting is the SELECT statement to which
> this filter
> > is being appended. That actually matters...
> >
> > 1. Do you need to include a relation qualifier to
> CLIENT_NAME? (the
> > relation name or relation alias that is used for that table in your
> > SELECT statement).
> >
> > 2. Try putting parentheses right around the whole thing.
> Filters are
> > appended to any existing WHERE clause so it's possible the revised
> > WHERE clause needs to isolate the filter.
> >
> > 3. Put in a monitor dialog. It's an amazingly useful way
> to resolve
> > "weird", "strange", etc.
> >
> > Helen
> >
>
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>
>