Subject Re: Need help with running for select... do loop through isql
Author josephhirn
Basically i need to loop through a set of document_page records using
the id and document_id of each record to insert a corresponding record
into endorsement using the document_page's id and document_id (id and
document_id are the concatinated key).

I would like to have seen constraints manage this, but we didn't and I
need a clean up script.

Basically i need :

for select id, document_id from docpage
where (...)
into :id, :document_id
do begin
insert into endorsement (id, document_id,...)
values (:id,:document_id,...)
end

--- In firebird-support@yahoogroups.com, "Nick" <nick@u...> wrote:
> the "for .. select do" syntax only works inside Procedures and
Triggers
>
> it may be possible to do what you need without using it, please post
what
> the script needs to achieve
>
> --
> Nick
> -----We Solve your Computer Problems---
> Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly
>
> Our environment is gentoo linux kernel 2.1.10 and firebird 1.0.3. I
> would like call isql -in mySQL.sql and have this script execute but
I
> keep getting a message that FOR is an un known token.
>
>
>
> [Non-text portions of this message have been removed]