Subject Re: [IBO] IBO Doesn't like this query
Author Helen Borrie
At 12:18 AM 22-08-02 -0700, you wrote:
> > >It is a valid SQL statement, so it
> > >should work, right?
> >
> > It's an ambiguous query, to begin with, but if you are not using Firebird
> > then you will probably be allowed to submit it.
>I am using Firebird, and it DOES allow me to submit it.

Then it must be a very old version of Firebird. Ambiguous queries like
your example have been disallowed since beta 2.

> > This is the correct syntax:
> >
> > select * from products p
> > left outer join vendorproducts v on
> > p.prodbarcode=v.vpupc
> > and p.prodsource=v.vpvendor
> > where v.vpcost = 0
> > or v.vpcost is null
>That last line was not part of my original query. IBO is generating that part
>(for the master-detail maybe?). What is that ? /* BIND_0 */ about anyway?

That is the limiting clause constructed by the IBO parser based on the some
Links you supplied. /* BIND_0 */ is just a comment indicating an internal
variable that a parameter value is bound to - very likely the linking
parameter for the detail set, e.g. the key you supplied via the detail
set's MasterFields property.

This will be problemmatical, because PRODBARCODE is not a unique key in the
master set.