Subject Re: FireBird SQL help
Author Adam
>
> HI, Adam
>
> Thanks. It looks like I have to create a temparily table to store
the data return from the stored procedure, and run the second query
against it.

Why? I posted a query that should return the correct result.

It uses aliases to use the stored procedure multiple times in the same
query. You could modify your stored procedure to take an input
parameter (modelno) if NULL, it returns your original query, otherwise
it returns the information only for that model number. If you want
further help, then you will have to display some stored procedure
source and possibly some relevant table structures.

Temporary tables are tricky in FB 1.5 in that you need to make sure you
include current_transaction in the key and remember to clean up after
yourself. Otherwise if two people run the same thing at once you are in
trouble.

Adam