find free number in col

From: Jens Puruckherr (puru@elbvilla.de)
Date: Tue Oct 12 1999 - 07:11:28 EST


Hi!

It's more a problem in maths but in msql, but I don't know who can give
better answers then programmers ;-)

following task:
In a col of a msql-table there are in each row an unique number
a,b,c....(int)
The next INSERT should find "itself" the next free number d=c+1
the overnext INSERT should find the number e=d+1

a DELETE deletes the row with the number b
The next INSERT should now get the free number b
the overnext INSERT get's the number f=e+1

How can I get the biggets free number and how can I get the "holes" in the
numberlist??
in Lite??

Thanks!!

Mit freundlichen Grüßen

Jens Puruckherr

EDV-Manager
Elbvilla facility Service GmbH
Scharfenberger Straße 2
01139 Dresden
-------------------------------------------------------
Tel. 03528/446372 mail:puru@elbvilla.de
Fax. 0351/8588571 http://www.wohnungsmarkt-dresden.de

-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:03:51 EST