Subject Re: [firebird-support] delete min
Author Kjell Rilbe
Alejandro Garcia wrote:
> Regarding the reasons for deleting patients records I'm only deleting
> temporal files and it's the way I found to solve the following problem:
> Some patients come to hospital after discharge once a year for a
> specific evaluation called PIV. So I have a table with all patients
> PIVs. I was asked to create a table with all patients first PIV, another
> table with all patient's second PIV, and so on. To find the first PIV I
> need the minimun date, to find the second PIV I delete that minimun and
> look for the minimun in the remaining table and so on... always working
> in temporal tables.

Sounds like a job for a SP or execute block, because you can loop
through the records a single itme and copy them into the appropriate
tables. I'm sure someone will help if you can't solve that yourself. I
cannot - never used SP:s etc.

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64