Subject | Re: Can I delete a row that is the subject of a query that is deleting it?? |
---|---|
Author | Adam |
Post date | 2007-02-15T23:15:53Z |
--- In firebird-support@yahoogroups.com, "mlq97" <mlq@...> wrote:
check is to move v_docline_id to an output parameter, put a suspend in
the loop and call it with the select (not usually a good practice,
just a debug suggestion) to make sure you are actually getting the
rows you think.
Adam
>problem.
> Can I delete a row that is the subject of a query that is deleting it??
> If not, how can I do this? It doesn't seem to work and I am wondering
> if it is intrinsically impossible or whether there is some other
>From memory you can. Maybe check your where clause. A simple way to
> For example:
>
> BEGIN
> FOR SELECT docline.docline_id
> FROM docline
> INTO :v_docline_id
> /* where etc */
>
> DO BEGIN
> DELETE from docline
> WHERE
> docline.docline_id = :v_docline_id;
> END
> END
>
check is to move v_docline_id to an output parameter, put a suspend in
the loop and call it with the select (not usually a good practice,
just a debug suggestion) to make sure you are actually getting the
rows you think.
Adam