Subject Re: [firebird-support] Subselects
Author Martijn Tonies
Hi,

> I wonder if the occasional problems with subselects are resolved in FB1.5
??
>
> Here is the excerpt from our procedure:
>
> SELECT VALID_FROM, PRICE FROM MATERIALCENA
> WHERE MATERIALid = :IMATERIALID AND VALID_FROM =
> (select max(MC.VALID_FROM from materialcena mc where mc.materialid =
> :imaterialid and mc.VALID_FROM <= 'today')
> INTO :VALID_FROM, :PRICE;
>
> Suddenly subselect didn't return max(valid_from)
>
> After we restarted the server, the results are ok again

Did you modify the procedure prior to executing it?

> PS.: this problem should have been solved years ago

Feel free to help, instead of complain.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com