Subject | Re: Filter Problems |
---|---|
Author | Bill Gage |
Post date | 2005-02-11T00:00:14Z |
You'll note the Group by so there IS more than one record.
--- In IBObjects@yahoogroups.com, "Bob Zirbel" <bobz22001@y...>
wrote:
--- In IBObjects@yahoogroups.com, "Bob Zirbel" <bobz22001@y...>
wrote:
>SUM)
> Bill
>
> I'm not sure what you are trying to do is valid.
>
> Your query returns only one record anyway because of Count (and
> so it doesn't make sense to apply a filter.you
> All you can do is restrict the number of records included in the
> Count by filtering on an actual database field like Product_Code.
>
> If you explain what you are trying to do, I may be able to help
> with the SQL.property
>
> Regards
>
> Bob
>
>
> --- In IBObjects@yahoogroups.com, "Bill Gage" <wcgage@y...> wrote:
> >
> > v 4.2G
> > using TIBOQuery and TIBODatabase
> >
> > I have been having wierd results trying to use the Filter
> > of IBObjects.to
> >
> > I have a simple query that is like the following
> >
> > SELECT Count(*), PRODUCT_CODE, SUM(BALANCE) BAL FROM ACCOUNTS
> GROUP
> > BY PRODUCT_CODE
> >
> > it runs fine
> >
> > I try to set the filter to the following
> > COUNT > 10
> >
> > I get the following error
> > SQL error code = -104
> > Token unknown - line 2, char 12
> > >
> >
> > I even tried the above on other queries doing the same thing and
> > against different databases and still get the same error.
> >
> > I tried changing the filter to
> >
> > COUNT = 10
> >
> > and I get...
> > SQL error code = -104
> > Token unknown - line 2, char 12
> > =
> >
> > Then I have tried filtering off other fields
> > PRODUCT_CODE = 'L11'
> > this worked
> >
> > I tried another field
> > BAL > 1000
> >
> > and I get the error
> > SQL error code = -206
> > column unknown
> > BAL
> >
> > Is there some sort of setting I need to make to get the filter
> > function consistently?
> >
> > Or is there a bug with the filtering in version 4.2?
> >
> > Bill