Subject | Re: ibotable filter problem |
---|---|
Author | hundri_106 |
Post date | 2002-02-25T14:05:27Z |
--- In IBObjects@y..., "Helen Borrie (TeamIBO)" <helebor@d...> wrote:
ok...
1. Filter: order_quantity=(order_for_bookshop)
Monitor:
SELECT ALL TOORDER.*
FROM TOORDER
WHERE (order_quantity = ( AND order_for_bookshop ))
ORDER BY TOORDER.ID ASC
The adding by the parser of the "AND" is incorrect
2. Filter: order_quantity=order_for_bookshop
Results are correct for this one. But why should this be different
from the one above?
3. Filter: (order_for_bookshop)=order_quantity
Monitor: No output but this exception is thrown:
Invalid Syntax: extra or missing parenthesis:
(
(
order_for_bookshop ) =
order_quantity
)
Parser added an extra bracket here
4. Filter: (order_for_bookshop+order_for_clients)=order_quantity
Results are same as (3) above
5. Filter: order_for_bookshop+order_for_clients=order_quantity
Results: Correct interpretation.
6. Filter: order_for_bookshop + order_for_clients=order_quantity
(note the space near the "+" !)
Monitor: SELECT ALL TOORDER.*
FROM TOORDER
WHERE (order_for_bookshop+ order_for_clients = AND order_quantity)
ORDER BY TOORDER.ID ASC
Parser incorrectly added "AND"
> At 01:08 PM 25-02-02 +0100, you wrote:question
> >I'm trying to invoke a filter on a TIBOTable. The filter query in
> >is a compound statement somewhat similar to this:Quantity_from_Supplier1+Quantity_from_Supplier2);
> >
> >aTable.Filter:=(x >
> >SQL I know
> >When I try to do this, I get a "missing or extra" parenthesis. In
> >I can add this to the where clause and get the correct results soI'm left
> >wondering if this is an ibo bug :-(live for
> >
> >Any suggestions anyone?
>
> Yes -
> 1. observe in the IB_Monitor what the statement is (you cannot
> long in client/server without IB_Monitor). That might help to getyou
> familiar with what the parser is doing with the elements of thestatement.
ok...
>something
> 2. Amend the filter clause so that the brackets actually do
> useful (like isolating the evaluation expression):(Quantity_from_Supplier1+Quantity_from_Supplier2);
>
> aTable.Filter:= x >
>Here are the (illogical IMHO) results:
1. Filter: order_quantity=(order_for_bookshop)
Monitor:
SELECT ALL TOORDER.*
FROM TOORDER
WHERE (order_quantity = ( AND order_for_bookshop ))
ORDER BY TOORDER.ID ASC
The adding by the parser of the "AND" is incorrect
2. Filter: order_quantity=order_for_bookshop
Results are correct for this one. But why should this be different
from the one above?
3. Filter: (order_for_bookshop)=order_quantity
Monitor: No output but this exception is thrown:
Invalid Syntax: extra or missing parenthesis:
(
(
order_for_bookshop ) =
order_quantity
)
Parser added an extra bracket here
4. Filter: (order_for_bookshop+order_for_clients)=order_quantity
Results are same as (3) above
5. Filter: order_for_bookshop+order_for_clients=order_quantity
Results: Correct interpretation.
6. Filter: order_for_bookshop + order_for_clients=order_quantity
(note the space near the "+" !)
Monitor: SELECT ALL TOORDER.*
FROM TOORDER
WHERE (order_for_bookshop+ order_for_clients = AND order_quantity)
ORDER BY TOORDER.ID ASC
Parser incorrectly added "AND"