Subject Re: [firebird-support] How to delete the output of this "select first 100 seqno from repl_log where relationno =11 order by seqno"
Author Adomas Urbanavicius
>
>Doind this:-
>
>"delete from repl_log where exists (select first 100 seqno from
>repl_log where relationno =11 order by seqno) "
>seems like deleting the who table instead of 100 records that I wanted
>to delete. Anybody know why?
>
>
>
Deletion becomes recursive; I'd suggest stored procedure with something
like
while counter < 100
select first 1 keys from repl_log order by seqno into
:KeyToDelete
delete from repl_log where key = KeyToDelete
counter++

Adomas



>* repl_log is a table. relationno and seqno are fields in repl_log table.
>** I want to delete the first 100 data with relationno = 11 sorted by seqno
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>