Subject Re: [firebird-support] how to use order by for selected record in insert
Author Milan Babuskov
Mercea Paul wrote:
> But I can't use :
>
> Insert into rpr_comp (:newid, ord, complete_descr)

Shouldn't that be:

Insert into rpr_comp (ord, complete_descr)

?

> Select c2.ord, c2.complete_descr
> From rpr_comp ce
> Where c2.code = :oldid
> Order by c2.ord

What sense does it make to ORDER the insert? All records are going to
get in the table anyway? Maybe you have some triggers on RPR_COMP table
and wish them to fire in the right order?

Anyway, the statement similar to the one you wrote works quite fine on
my system using FlameRobin (with or without stored procedure).

--
Milan Babuskov
http://www.flamerobin.org